Opened 10 years ago

Closed 9 years ago

#1027 closed defect (invalid)

AutoTimeField raises KeyError if included in META.admin.fields

Reported by: deric <deric@…> Owned by: adrian
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: UI/UX:


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 9 years ago by Gary Wilson <gary.wilson@…>

  • Resolution set to invalid
  • Status changed from new to closed

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