Closed Abashinos closed 5 years ago
The provided fix introduces a new problem when thousand separator is used and set to space, because the id() function returns an integer, which gets outputted in template with spaces:
<input id="140 508 952 282 416-query-string" value="?" type="hidden">
This in turn breaks selectors in JS code and leads to a series of weird redirects instead of filtering:
[14/May/2019 08:59:45] "GET /admin/orders/order/undefined&/ HTTP/1.1" 302 0
[14/May/2019 08:59:45] "GET /admin/orders/order/undefined&/change/ HTTP/1.1" 302 0
[14/May/2019 08:59:45] "GET /admin/ HTTP/1.1" 200 25911
Thx, fix
Call to django slugify function here converts any non-unicode characters (e.g. cyrillic) to empty characters, which leads to all _systemname fields being empty. In this case, any date range filters except the first one don't work at all.
Suggested solution: add
transliterate
package to requirements and instead offrom django.template.defaultfilters import slugify
usefrom transliterate.utils import slugify
. That fixes the issue (cyrillic characters get transliterated correctly) and has no side effects as far as I see.