Answer the question
In order to leave comments, you need to log in
How to solve the problem of Cyrillic in url?
Good afternoon!
Installed Django-filter, filter forms work fine, but as soon as you change the display method from forms to AllValuesFilter, everything collapses here is an error:
But if the query string is not empty, but something like www.your-url.com/catalog/printer?printer_type= then it is displayed all OK.
I decided to go to the django-filter sources and changed the line from url = urlencode(data) to url = data, everything seemed to work, but this is not an option, because the url becomes scary :) because data is a json object as I understand it.
Another thing is strange, when there are no parameters in the URL, then for some reason the data parameter is not empty, it contains the following information:
Point me to the right path, maybe something needs to be changed in the PrinterFilter class?
Answer the question
In order to leave comments, you need to log in
before passing data to the filter, try doing .decode('utf-8') or encode )))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question