First time here? Check out the FAQ!
2

How to enable Unicode in URL slug?

I have Searched a lot in Askbot source code to understand how Askbot deal with URL slugs.

Why unicode url? because my Askbot site using Arabic language and all user input in Arabic, only 20% in English.

I found the solution and I'll write it as answer. However, I really can't understand why this not enabled by default?

At least it should be placed as comment in settings.py and any one can enable it by uncomment the option.

A lot of Askbot power are not documented, this what I unlike in Askbot, each time I have to do something not documented in Askbot I have to read some source code, well not everyone understand Python/Django, and it's waste of time.

Mustafa's avatar
48
Mustafa
asked 2013-08-19 21:23:44 -0500
edit flag offensive 0 remove flag close merge delete

Comments

1

Why it's not enabled by default - browsers used to have poor support for the unicode URLs and would show gibberish in the address bar, this is getting better though and eventually it may be the default setting.

Evgeny's avatar Evgeny (2013-08-20 03:39:55 -0500) edit

Ok, but why it's not placed as comment in settings.py for easy on/off :)

Mustafa's avatar Mustafa (2013-08-20 07:52:23 -0500) edit
add a comment see more comments

1 Answer

3

To enable this feature, simply open settings.py and at the end of file, insert as new line

ALLOW_UNICODE_SLUGS = True

Save file, and restart web-server.

Mustafa's avatar
48
Mustafa
answered 2013-08-19 21:25:38 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments