Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored
1  AUTHORS
@@ -71,6 +71,7 @@ answer newbie questions, and generally made Django that much better:
71 71
     gandalf@owca.info
72 72
     Baishampayan Ghose
73 73
     martin.glueck@gmail.com
  74
+    Simon Greenhill <dev@simon.net.nz>
74 75
     Espen Grindhaug <http://grindhaug.org/>
75 76
     Brant Harris
76 77
     hipertracker@gmail.com
6  django/core/management.py
@@ -953,6 +953,12 @@ def get_validation_errors(outfile, app=None):
953 953
                             f = opts.get_field(fn)
954 954
                         except models.FieldDoesNotExist:
955 955
                             e.add(opts, '"admin.list_filter" refers to %r, which isn\'t a field.' % fn)
  956
+                # date_hierarchy
  957
+                if opts.admin.date_hierarchy:
  958
+                    try:
  959
+                        f = opts.get_field(opts.admin.date_hierarchy)
  960
+                    except models.FieldDoesNotExist:
  961
+                        e.add(opts, '"admin.date_hierarchy" refers to %r, which isn\'t a field.' % opts.admin.date_hierarchy)
956 962
 
957 963
         # Check ordering attribute.
958 964
         if opts.ordering:

0 notes on commit 350a4a4

Please sign in to comment.
Something went wrong with that request. Please try again.