#1754 closed defect (fixed)
[patch] models.DateField should allow string lookups
Reported by: | Esaj | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
At the moment DateField.get_db_prep_lookup
assumes that values passed to it are datetime objects when doing certain lookup types.
This patch falls back to using str(value)
, which means that various date lookup queries can work in the admin changelist.
Attachments (1)
Change History (3)
by , 19 years ago
Attachment: | __init__.py.diff added |
---|
comment:1 by , 18 years ago
Note:
See TracTickets
for help on using tickets.
See also #2211. Not sure which patch is better at the moment.