Django

Code

Changeset 7093

Show
Ignore:
Timestamp:
02/07/08 22:21:21 (10 months ago)
Author:
mtredinnick
Message:

queryset-refactor: Removed handle_legacy_orderlist() call from admin. Refs #245.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/queryset-refactor/django/contrib/admin/views/main.py

    r6726 r7093  
    99from django.shortcuts import get_object_or_404, render_to_response 
    1010from django.db import models 
    11 from django.db.models.query import handle_legacy_orderlist, QuerySet 
     11from django.db.models.query import QuerySet 
    1212from django.http import Http404, HttpResponse, HttpResponseRedirect 
    1313from django.utils.html import escape 
     
    654654    def get_ordering(self): 
    655655        lookup_opts, params = self.lookup_opts, self.params 
    656         # For ordering, first check the "ordering" parameter in the admin options, 
    657         # then check the object's default ordering. If neither of those exist, 
    658         # order descending by ID by default. Finally, look for manually-specified 
    659         # ordering from the query string. 
     656        # For ordering, first check the "ordering" parameter in the admin 
     657        # options, then check the object's default ordering. If neither of 
     658        # those exist, order descending by ID by default. Finally, look for 
     659        # manually-specified ordering from the query string. 
    660660        ordering = lookup_opts.admin.ordering or lookup_opts.ordering or ['-' + lookup_opts.pk.name] 
    661  
    662         # Normalize it to new-style ordering. 
    663         ordering = handle_legacy_orderlist(ordering) 
    664661 
    665662        if ordering[0].startswith('-'):