Fine, what do you think of 792b69a ?

W dniu 22.05.2013 22:04, Kenneth Love pisze:
> In braces/views.py:
>
>> +                ('Please define default ordering column in your model')
>> +
>> +        self.order_by = order_by
>> +        self.ordering = 'asc'
>> +
>> +        if order_by and self.request.GET.get('ordering', 'asc') == 'desc':
>> +            order_by = '-' + order_by
>> +            self.ordering = 'desc'
>> +
>> +        return qs.order_by(order_by)
>> +
>> +    def get_queryset(self):
>> +        """
>> +        Returns ordered ``QuerySet``
>> +        """
>> +        return self.get_ordered_queryset(super(OrderableListMixin, self).
>
> I'm not sure exactly why, but this bothers me. I'd almost rather see you
> get the default queryset and then return the results of the method on
> that queryset, explicitly as two steps.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/brack3t/django-braces/pull/45/files#r4347632>.
>


-- 
Piotr Kilczuk - Web Programmer

Tymaszweb.pl - rozwiązania internetowe
http://tymaszweb.pl // piotr@tymaszweb.pl // +48 608 026 699