Closed adilkhash closed 7 years ago
Hi! Thanks for pointing out! Here is a link to release notes: https://docs.djangoproject.com/en/dev/releases/1.10/#internationalization
This probably isn't the right place, but thought someone else may find this useful: https://gist.github.com/blopker/bb9107249bc34dfd646aee48b1d5218e
It replicates the redirecting behavior from django-solid-i18n-urls but using native Django 1.10 with prefix_default_language. It probably doesn't work for all cases, but it's a start.
Basically with these settings:
SOLID_I18N_USE_REDIRECTS = True
SOLID_I18N_DEFAULT_PREFIX_REDIRECT = True
Anyway, thank you for django-solid-i18n-urls, it has been immensely helpful.
Upgrading to Django 1.10 results in error:
ImportError: cannot import name 'patterns'
in:
File "/usr/local/lib/python3.5/dist-packages/solid_i18n/urls.py", line 3, in
from django.conf.urls import patterns
Looks like the package is using deprecated method to define urlpatterns
:
urlpatterns = patterns(
# patterns...
)
instead of currently recommended list syntax:
urlpatterns = [
# patterns...
]
Great package, but this issue won't let me painlessly update to 1.10.
@Kid-Binary With Django 1.10 you no longer need to use this package. Look at my first message at the top.
Oh... I'm sorry, missed that. Your package is cool anyway and helped a lot in the past : )
Guys, I've added deprecation notice in README. There are some settings in this package, that still can be useful. So I decided to update the code to support Django 1.10 as well.
Hello. Starting from version 1.10, Django has keyword argument _prefix_defaultlanguage in i18n_patterns() which controls whether to put default language prefix in the url or not, hence no need to use solid_i18n. I have created this issue in case if somebody experiences problems during upgrade to >= Django 1.10.