Opened 18 years ago
Closed 18 years ago
#2467 closed defect (fixed)
[patch] date_hierarchy in model is not checked for validity.
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | minor | Keywords: | |
Cc: | dev@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When one of the models has the date_hierarchy incorrectly set ( i.e. typo, or the string isn't a field in the model ), the admin section fails with a template syntax error:
FieldDoesNotExist at /admin/<app>/<something>/ Link has no field named '<misspelt field name>')
I've modified django.core.management.get_validation_errors to check that the field specified in date_hierarchy is a valid model field.
Attachments (1)
Change History (3)
by , 18 years ago
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This might also fix ticket:1377 - Looking at it, it looks like that error occured due to date_hierarchy being passed a tuple and not a string.