dynamicweb/dynamicweb/urls_multi.py

20 lines
562 B
Python
Raw Normal View History

2018-02-20 05:53:29 +00:00
from django.conf import settings
2018-02-15 16:58:30 +00:00
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
2018-02-20 05:53:29 +00:00
from django.contrib import admin
from django.views import static as static_view
from django.views.generic import RedirectView
2018-02-15 16:58:30 +00:00
urlpatterns = i18n_patterns(
url(r'^admin/', include(admin.site.urls)),
2018-02-22 09:41:34 +00:00
url(r'^cms/', include('cms.urls')),
url(r'^$', RedirectView.as_view(url='/cms')),
2018-02-15 16:58:30 +00:00
)
urlpatterns += [
url(r'^media/(?P<path>.*)$',
static_view.serve, {
'document_root': settings.MEDIA_ROOT,
}),
]