Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #2467 -- Improved model validator to check date_hierarchy. Than…

…ks, Simon Greenhill

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 350a4a459298469f6f9fcaca8781e88452a97351 1 parent fa5e056
@adrianholovaty adrianholovaty authored
Showing with 7 additions and 0 deletions.
  1. +1 −0  AUTHORS
  2. +6 −0 django/core/management.py
View
1  AUTHORS
@@ -71,6 +71,7 @@ answer newbie questions, and generally made Django that much better:
gandalf@owca.info
Baishampayan Ghose
martin.glueck@gmail.com
+ Simon Greenhill <dev@simon.net.nz>
Espen Grindhaug <http://grindhaug.org/>
Brant Harris
hipertracker@gmail.com
View
6 django/core/management.py
@@ -953,6 +953,12 @@ def get_validation_errors(outfile, app=None):
f = opts.get_field(fn)
except models.FieldDoesNotExist:
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.
if opts.ordering:
Please sign in to comment.
Something went wrong with that request. Please try again.