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:
parent
f3f002b161
commit
1926428a55
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue