for example in this url:
(r'^company/لیست-مقالات/$','CompanyHub.views.docList')
in لیست مقالات part I have unicode characters but I get this error:
Caught UnicodeDecodeError while rendering: 'ascii' codec can't decode byte 0xd9 in position 0: ordinal not in range(128)
You need to put a u in front of r before the string, or wrap it in the unicode method:
See this for more info.
Unicode strings are much like strings, but are specified in the syntax using a preceding 'u' character: u'abc', u"def".
http://docs.python.org/library/stdtypes.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With