summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-08-02 15:05:51 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-08-02 15:05:51 +0000
commit350a4a459298469f6f9fcaca8781e88452a97351 (patch)
tree4ec8ef4ab72ccb554b3edadb6f48c37493eea186
parentfa5e0562dcdf438ca7c1285b6d69f6c31bf0c676 (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--AUTHORS1
-rw-r--r--django/core/management.py6
2 files changed, 7 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index f44bc42af0..9c9e67c50a 100644
--- a/AUTHORS
+++ b/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
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: