Fixed #2098 -- Loosened validation for model 'ordering' parameter by allowing periods. Thanks, Alex Dedul

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3095 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-06-07 02:47:53 +00:00
parent f3f002b161
commit 1926428a55
1 changed files with 1 additions and 0 deletions

View File

@ -923,6 +923,7 @@ def get_validation_errors(outfile, app=None):
field_name = field_name[1:]
if opts.order_with_respect_to and field_name == '_order':
continue
if '.' in field_name: continue # Skip ordering in the format 'table.field'.
try:
opts.get_field(field_name, many_to_many=False)
except models.FieldDoesNotExist: