From 350a4a459298469f6f9fcaca8781e88452a97351 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 2 Aug 2006 15:05:51 +0000 Subject: [PATCH] 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 --- AUTHORS | 1 + django/core/management.py | 6 ++++++ 2 files changed, 7 insertions(+) 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 Espen Grindhaug 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: