From 9d38d3aee6303319fd0e07dc632f1d501599f6b7 Mon Sep 17 00:00:00 2001 From: rscnt Date: Sun, 4 Oct 2015 09:38:01 -0600 Subject: [PATCH] digitalglarus: i18n django-cms conf --- dynamicweb/urls.py | 9 +++++++-- templates/cms/digitalglarus/base.html | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py index a69f2abe..b624498d 100644 --- a/dynamicweb/urls.py +++ b/dynamicweb/urls.py @@ -1,6 +1,7 @@ from django.conf.urls import patterns, include, url from django.contrib import admin # deprecated in version 1.8 +from django.conf.urls.i18n import i18n_patterns from django.conf.urls.static import static from dynamicweb import settings @@ -11,13 +12,17 @@ urlpatterns = [ namespace="digitalglarus")), url(r'^hosting/', include('hosting.urls', namespace="hosting")), url(r'^railshosting/', railshosting, name="rails.hosting"), - url(r'^admin/', include(admin.site.urls)), - url(r'^', include('cms.urls')), url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), url(r'^jsi18n/(?P\S+?)/$', 'django.views.i18n.javascript_catalog'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) +# note the django CMS URLs included via i18n_patterns +urlpatterns += i18n_patterns('', + url(r'^admin/', include(admin.site.urls)), + url(r'^', include('cms.urls')), +) + if settings.DEBUG: urlpatterns += patterns('', url(r'^media/(?P.*)$', diff --git a/templates/cms/digitalglarus/base.html b/templates/cms/digitalglarus/base.html index 6dd1bfc0..4ae66fa0 100644 --- a/templates/cms/digitalglarus/base.html +++ b/templates/cms/digitalglarus/base.html @@ -1,5 +1,4 @@ -{% load staticfiles cms_tags menu_tags sekizai_tags %} - +{% load staticfiles cms_tags menu_tags sekizai_tags menu_tags %} @@ -49,7 +48,8 @@ - {% cms_toolbar %} + {% cms_toolbar %} + {% language_chooser "myapp/language_chooser.html" %}
Digital Glarus
{% placeholder 'digital_glarus_legend' %}