what happens is if I go to www.example.com/es/ I am redirected to 
www.example.com/catalogue




quarta-feira, 22 de Janeiro de 2020 às 15:01:06 UTC, Yahiba escreveu:
>
> I'm not sure if this can help, but here it goes the cmd response when I 
> set the language to Spanish
>
> [22/Jan/2020 14:59:07] "POST /i18n/setlang/ HTTP/1.1" 302 0
> [22/Jan/2020 14:59:07] "GET /es/ HTTP/1.1" 302 0
> [22/Jan/2020 14:59:07] "GET /catalogue/ HTTP/1.1" 200 70334
>
>
>
>
>
>
>
>
>
> quarta-feira, 22 de Janeiro de 2020 às 14:37:24 UTC, Yahiba escreveu:
>>
>> Hello again Samir,
>>
>> I noticed this is related to my previous post. If I am in a product 
>> directory and change the language, I am redirected to that same product in 
>> the new language selected.
>>
>> Now if am at the root and change the language, I am redirected to 
>> /catalogue ( in the new language).
>>
>> In this specific case I want to remain at the root directory(with the new 
>> language). All the others cases seem to be working correctly.
>>
>> here is my urls.py main file:
>>
>> from Store import views
>> urlpatterns = [
>>     url(r'^$', views.home, name ='home'),
>>     url(r'^sobre-nos/$', views.about, name ='about'),
>>     url(r'^dashboard/translation$',views.dashboard_translation, 
>> name="dashboard_translation"),
>>     url(r'^dashboard/sobre-nos/$', views.sobre_nos, 
>> name='dashboard-sobre-nos'),
>>     url(r'^dashboard/bem-estar/$', views.bem_estar, 
>> name='dashboard-bem-estar'),
>>     url(r'^dashboard/home-page/$', views.home_page, 
>> name='dashboard-home-page'),
>>
>> ]
>>
>> from django.contrib.sitemaps import views
>>
>> urlpatterns += [
>>
>>
>>
>>     path('store/', include('Store.urls')),
>>
>>     path('bem-estar/', include('myblog.urls')),
>>     path('ckeditor/', include('ckeditor_uploader.urls')),
>>     path('i18n/', include('django.conf.urls.i18n')),  # > Django-2.0
>>     path('admin/', admin.site.urls),  # > Django-2.0
>>
>>     path('', include(apps.get_app_config('oscar').urls[0])),  # > 
>> Django-2.0
>>
>>
>>     url(r'^sitemap\.xml$', views.index,
>>         {'sitemaps': base_sitemaps}),
>>     url(r'^sitemap-(?P<section>.+)\.xml$', views.sitemap,
>>         {'sitemaps': base_sitemaps},
>>         name='django.contrib.sitemaps.views.sitemap'),
>>
>>
>>
>> ]+static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
>>
>>
>>
>> I had to do this because oscar root is redirected to /catalogue.
>> But now when I am at the root and switch language, I continue to be 
>> redirected to /catalogue
>>
>>
>>
>>
>> quarta-feira, 22 de Janeiro de 2020 às 12:56:58 UTC, Samir Shah escreveu:
>>>
>>> That seems to be what you would want? So the next URL is set to be the 
>>> same as the current URL without the language code. You should then get 
>>> redirected to the new language code with this URL path appended. 
>>>
>>> On Wed, 22 Jan 2020, 15:36 Yahiba, <yahi...@gmail.com> wrote:
>>>
>>>> Hello again Samir,
>>>>
>>>> I now noticed the the {{ language_neutral_url_path }} will be equal to 
>>>> the directory I am on, so previously it was just a slash ( / ) because I 
>>>> was in the root directory, so if I switch to the catalogue it will be ( 
>>>> /catalogue/ ) 
>>>>
>>>>
>>>>
>>>> I have the following configurations:
>>>>
>>>>
>>>> USE_I18N = True
>>>>
>>>> USE_L10N = True
>>>>
>>>> USE_TZ = True
>>>>
>>>>
>>>> I tried turnig False USE_I18N but then the language switching does not 
>>>> work.
>>>>
>>>>
>>>>
>>>> quarta-feira, 22 de Janeiro de 2020 às 11:53:04 UTC, Samir Shah 
>>>> escreveu:
>>>>>
>>>>> I'm not too sure what the issue is then. Do you have `USE_I18N` set 
>>>>> to True in your settings? That is the only other thing that would 
>>>>> short-circuit the context variable.
>>>>>
>>>> -- 
>>>> https://github.com/django-oscar/django-oscar
>>>> http://django-oscar.readthedocs.org/en/latest/
>>>> https://twitter.com/django_oscar
>>>> --- 
>>>> You received this message because you are subscribed to a topic in the 
>>>> Google Groups "django-oscar" group.
>>>> To unsubscribe from this topic, visit 
>>>> https://groups.google.com/d/topic/django-oscar/QPsfCnbbuzU/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> django...@googlegroups.com.
>>>> To view this discussion on the web, visit 
>>>> https://groups.google.com/d/msgid/django-oscar/27a96c67-3ba5-4764-bc31-9e5b8330f2b6%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-oscar/27a96c67-3ba5-4764-bc31-9e5b8330f2b6%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>

-- 
https://github.com/django-oscar/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
--- 
You received this message because you are subscribed to the Google Groups 
"django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-oscar+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/django-oscar/d27b0ad3-b8e5-4ede-be38-ac2881ea3bc8%40googlegroups.com.

Reply via email to