[contrib.admin] : search by date according to localization.

28 views
Skip to first unread message

Stan

unread,
Jul 4, 2012, 10:41:14 AM7/4/12
to django-d...@googlegroups.com
The way the query is constructed in admin.changelist to filter according the search parameters is very basic. There is no assumptions and no verifications done on the fields, it is just a string naively constructed from ModelAdmin.search_fields.
I am using it to allow one to search by date in a related model (since ModelAdmin.date_hierarchy does not accept a date field in a related) but the date format must be YY-MM-DD whatever is your localization, which is too bad.

Is it something that may be considered as a bug ?

Cheers.


Reply all
Reply to author
Forward
0 new messages