Ask Your Question
2

How to enable Unicode in URL slug?

asked 2013-08-19 21:23:44 -0600

Mustafa gravatar image

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.

edit retag flag offensive 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 gravatar imageEvgeny ( 2013-08-20 03:39:55 -0600 )edit

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

Mustafa gravatar imageMustafa ( 2013-08-20 07:52:23 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-08-19 21:25:38 -0600

Mustafa gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-08-19 21:23:44 -0600

Seen: 972 times

Last updated: Aug 19 '13