#319 closed defect (fixed)
prepopulate_from attribute does not correctly handle DateTimeField types
Reported by: | anonymous | Owned by: | Adrian Holovaty |
---|---|---|---|
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: | no | UI/UX: | no |
Description
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?
Note:
See TracTickets
for help on using tickets.
(In [1105]) Fixed #319 -- Updated docs/model-api.txt to note that prepopulate_from doesn't accept DateTimeFields