Opened 17 years ago
Closed 9 years ago
#6439 closed New feature (duplicate)
support for filter methods on date field attributes
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | datefield, database api, filter methods |
Cc: | ross@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Exact matches on date field attributes such as:
filter(datefield__month=1)
are supported. For consistency, I think all filter methods on attributes such as:
filter(datefield__month__in=[1, 2, 3])
should also be supported.
OMat
Change History (6)
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:2 by , 16 years ago
Cc: | added |
---|
comment:3 by , 14 years ago
Type: | → New feature |
---|
comment:4 by , 13 years ago
Severity: | → Normal |
---|
comment:5 by , 13 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Design decision needed → Accepted |
UI/UX: | unset |
Accepted, though I think it's a dude of another ticket. Really this is representative of a large issue about fields defining their own lookups, and chaining those. But I don't know the dupe's #, so I'll let this be open.
comment:6 by , 9 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Fixed by #9596 in Django 1.9.filter. Sytanx is (datefield__date__month__in=[1, 2, 3])
Note:
See TracTickets
for help on using tickets.
FWIW I've just encountered this today trying to use this: