From 837a64565b2494d3cac6909b070cb29c567b786c Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 22 Jul 2005 13:03:50 +0000 Subject: [PATCH] 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 --- django/core/meta.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/meta.py b/django/core/meta.py index c328fa0823..81eeee4efa 100644 --- a/django/core/meta.py +++ b/django/core/meta.py @@ -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=''):