Opened 19 years ago
Closed 18 years ago
#1027 closed defect (invalid)
AutoTimeField raises KeyError if included in META.admin.fields
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
see: http://groups.google.com/group/django-users/browse_thread/thread/c6f657572ed23984/81ee8f9b17d3e208#81ee8f9b17d3e208 for discussion
I'm not sure if anything is wrong here or what the intended behaviour should be... probably consistency. AFAICS any field that has editable=False and is included in the META.admin.fields will throw KeyError so presumably this should be true for DateTimeFields and DateFields as well. What would probably be nicer though is if editable=False and inclusion in the Admin would be valid and non-editable fields would be just that: not editable.
Yes, setting a field to
auto_now=True
orauto_now_add=True
makes it not show up in the admin sinceeditable
becomes False. No one really really likes the current implementation of theauto_now
andauto_now_add
options. I am marking this ticket with it's current subject invalid. Feel free to start a discussion on the django-developers mailing list if you would like to spark some discussion on the matter.