#21186 closed Bug (fixed)
list_filter on a date field is not working as expected
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Release blocker | Keywords: | |
| Cc: | bmispelon@… | Triage Stage: | Accepted |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I am new user of Django and i am learning it.
I expect books which are getting publish in future date in the current month/year to be shown when i select "this month" or "this year". But it's show results only till current date.
I am attaching some of snapshots of web page and code as well, please let me know if any other information is needed.
Attachments (3)
Change History (10)
by , 12 years ago
| Attachment: | thismonth.png added |
|---|
by , 12 years ago
| Attachment: | thisyear.png added |
|---|
by , 12 years ago
| Attachment: | Anydate.png added |
|---|
follow-up: 6 comment:1 by , 12 years ago
comment:2 by , 12 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
We've been able to reproduce this with sqlite3 and MySQL
comment:3 by , 12 years ago
| Cc: | added |
|---|---|
| Severity: | Normal → Release blocker |
| Version: | 1.5 → master |
Some digging up indicates that the regression was introduced in bf0abe0ea6cb492810c5b4f9306a19c8afe603bb.
I reproduced the issue quite simply, using the following model/modeladmin:
class Foo(models.Model): publication_date = models.DateField() class FooAdmin(admin.ModelAdmin): list_display = ['pk', 'publication_date'] list_filter = ['publication_date']
I created four objects with the dates provided in the original report.
comment:4 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Thanks for your report.
Which database backend are you using?