Opened 13 years ago

Closed 12 years ago

#1027 closed defect (invalid)

AutoTimeField raises KeyError if included in META.admin.fields

Reported by: deric <deric@…> 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


see: 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.

Change History (1)

comment:1 Changed 12 years ago by Gary Wilson <gary.wilson@…>

Resolution: invalid
Status: newclosed

Yes, setting a field to auto_now=True or auto_now_add=True makes it not show up in the admin since editable becomes False. No one really really likes the current implementation of the auto_now and auto_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.

Note: See TracTickets for help on using tickets.
Back to Top