Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#319 closed defect (fixed)

prepopulate_from attribute does not correctly handle DateTimeField types

Reported by: anonymous Owned by: adrian
Component: contrib.admin Version:
Severity: normal Keywords: prepopulate slug javascript datetime
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


As the admin page splits DateTimeField entry into two textboxes and appends _date and _time, the JavaScript to prepopulate a field fails whilst looking for the original id_field instead of combining id_field_date and id_field_time appropriately.

However, this could be considered desired behaviour. If field_date or field_time is specified, then only the time or date will be used for prepopulation. This perhaps should be made clear within the documentation?

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by adrian

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

(In [1105]) Fixed #319 -- Updated docs/model-api.txt to note that prepopulate_from doesn't accept DateTimeFields

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.