Django now outputs a warning if you use old ordering syntax
git-svn-id: http://code.djangoproject.com/svn/django/trunk@293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
8b3c05afa5
commit
837a64565b
|
@ -66,9 +66,9 @@ def handle_legacy_orderlist(order_list):
|
|||
if not order_list or isinstance(order_list[0], basestring):
|
||||
return order_list
|
||||
else:
|
||||
# import warnings
|
||||
import warnings
|
||||
new_order_list = [LEGACY_ORDERING_MAPPING[j.upper()].replace('_', str(i)) for i, j in order_list]
|
||||
# warnings.warn("%r ordering syntax is deprecated. Use %r instead." % (order_list, new_order_list), DeprecationWarning)
|
||||
warnings.warn("%r ordering syntax is deprecated. Use %r instead." % (order_list, new_order_list), DeprecationWarning)
|
||||
return new_order_list
|
||||
|
||||
def orderlist2sql(order_list, prefix=''):
|
||||
|
|
Loading…
Reference in New Issue