Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1260 closed defect (invalid)

can't use DateTimeField with auto_now

Reported by: anykey@… Owned by: adrian
Component: contrib.admin Version: master
Severity: normal Keywords: __repr__ DateTimeField auto_now
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

mod_python shows an not very helpful error if a model uses a DateTimeField with auto_now=True which makes it a bit cumbersome to navigate in admin interface. It seems this is raised by the template which says "BlaBla was successfully created. ..." on the top f the page after creating a object and clicking on any of the save buttons.

I would say, at this moment the datetime value is not yet set, which causes this error, but this is only a guess.

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by adrian

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

Please reopen if this is still a problem.

comment:2 Changed 8 years ago by URL

  • Summary changed from can't use DateTimeField with auto_now=True together with __repr__ to can't use DateTimeField with auto_now

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.