diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-08-02 15:05:51 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-08-02 15:05:51 +0000 |
| commit | 350a4a459298469f6f9fcaca8781e88452a97351 (patch) | |
| tree | 4ec8ef4ab72ccb554b3edadb6f48c37493eea186 | |
| parent | fa5e0562dcdf438ca7c1285b6d69f6c31bf0c676 (diff) | |
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
| -rw-r--r-- | AUTHORS | 1 | ||||
| -rw-r--r-- | django/core/management.py | 6 |
2 files changed, 7 insertions, 0 deletions
@@ -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 diff --git a/django/core/management.py b/django/core/management.py index af95d4b6e1..7de6c86a04 100644 --- a/django/core/management.py +++ b/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: |
