project: urls, added i18n routes
Signed-off-by: rscnt <rascnt@gmail.com>
This commit is contained in:
parent
08d22489f0
commit
1338b94e07
1 changed files with 10 additions and 2 deletions
|
@ -2,18 +2,26 @@ from django.conf.urls import patterns, include, url
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
# deprecated in version 1.8
|
# deprecated in version 1.8
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
|
# i18n
|
||||||
|
from django.conf.urls.i18n import i18n_patterns
|
||||||
|
|
||||||
from dynamicweb import settings
|
from dynamicweb import settings
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^admin/', include(admin.site.urls)),
|
|
||||||
url(r'^digitalglarus/', include('digitalglarus.urls',
|
url(r'^digitalglarus/', include('digitalglarus.urls',
|
||||||
namespace="digitalglarus")),
|
namespace="digitalglarus")),
|
||||||
url(r'^railshosting/', include('railshosting.urls',
|
url(r'^railshosting/', include('railshosting.urls',
|
||||||
namespace="railshosting")),
|
namespace="railshosting")),
|
||||||
url(r'^', include('cms.urls')),
|
|
||||||
url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
|
url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
|
||||||
|
url(r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascript_catalog'),
|
||||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
] + 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:
|
if settings.DEBUG:
|
||||||
urlpatterns += patterns('',
|
urlpatterns += patterns('',
|
||||||
url(r'^media/(?P<path>.*)$',
|
url(r'^media/(?P<path>.*)$',
|
||||||
|
|
Loading…
Reference in a new issue