st4lk / django-solid-i18n-urls

[DEPRECATED] Use default language for urls without language prefix.
http://www.lexev.org/en/
Other
112 stars 29 forks source link

SOLID_I18N_HANDLE_DEFAULT_PREFIX behaviour #14

Closed st4lk closed 9 years ago

st4lk commented 9 years ago

When SOLID_I18N_HANDLE_DEFAULT_PREFIX = True and default language prefix is present in url, all other urls must be reversed also with that prefix (using reverse() or {% url 'name' %}). And if prefix is not in url - reverse without it. Currently in case of default language all urls are always reversed without language prefix. Related conversation is in comments of issue #10

st4lk commented 9 years ago

@jmp0xf check current version from pypi (v0.8.1). I think now behaviour is correct with SOLID_I18N_HANDLE_DEFAULT_PREFIX = True

jmp0xf commented 9 years ago

With setting SOLID_I18N_USE_REDIRECTS = True and SOLID_I18N_HANDLE_DEFAULT_PREFIX = True, the url name resolver seems OK now. But the new problem I encountered is that after the language is set to default, the url without language code prefix cannot be resolved.

st4lk commented 9 years ago

@jmp0xf can you please open a new issue with detailed description of problem, because currently in example project i don't see any problems.

jmp0xf commented 9 years ago

That would be weird, I just tested the example with setting SOLID_I18N_USE_REDIRECTS = True and SOLID_I18N_HANDLE_DEFAULT_PREFIX = True in Django 1.7.5, resulting in the same problem.