Fixed #2467 -- Improved model validator to check date_hierarchy. Thanks, Simon Greenhill
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
fa5e0562dc
commit
350a4a4592
1
AUTHORS
1
AUTHORS
|
@ -71,6 +71,7 @@ answer newbie questions, and generally made Django that much better:
|
||||||
gandalf@owca.info
|
gandalf@owca.info
|
||||||
Baishampayan Ghose
|
Baishampayan Ghose
|
||||||
martin.glueck@gmail.com
|
martin.glueck@gmail.com
|
||||||
|
Simon Greenhill <dev@simon.net.nz>
|
||||||
Espen Grindhaug <http://grindhaug.org/>
|
Espen Grindhaug <http://grindhaug.org/>
|
||||||
Brant Harris
|
Brant Harris
|
||||||
hipertracker@gmail.com
|
hipertracker@gmail.com
|
||||||
|
|
|
@ -953,6 +953,12 @@ def get_validation_errors(outfile, app=None):
|
||||||
f = opts.get_field(fn)
|
f = opts.get_field(fn)
|
||||||
except models.FieldDoesNotExist:
|
except models.FieldDoesNotExist:
|
||||||
e.add(opts, '"admin.list_filter" refers to %r, which isn\'t a field.' % fn)
|
e.add(opts, '"admin.list_filter" refers to %r, which isn\'t a field.' % fn)
|
||||||
|
# date_hierarchy
|
||||||
|
if opts.admin.date_hierarchy:
|
||||||
|
try:
|
||||||
|
f = opts.get_field(opts.admin.date_hierarchy)
|
||||||
|
except models.FieldDoesNotExist:
|
||||||
|
e.add(opts, '"admin.date_hierarchy" refers to %r, which isn\'t a field.' % opts.admin.date_hierarchy)
|
||||||
|
|
||||||
# Check ordering attribute.
|
# Check ordering attribute.
|
||||||
if opts.ordering:
|
if opts.ordering:
|
||||||
|
|
Loading…
Reference in New Issue