Added /cms prefix to django-cms urls

This commit is contained in:
M.Ravi 2017-09-22 08:47:42 +02:00
parent dd3c967500
commit 2b0dbfa1e5
1 changed files with 10 additions and 4 deletions

View File

@ -5,7 +5,8 @@ from django.conf.urls.static import static
from django.views import i18n, static as static_view
from django.conf import settings
from hosting.views import RailsHostingView, DjangoHostingView, NodeJSHostingView
from hosting.views import RailsHostingView, DjangoHostingView, \
NodeJSHostingView
from membership import urls as membership_urls
from ungleich_page.views import LandingView
from django.views.generic import RedirectView
@ -49,9 +50,14 @@ urlpatterns += i18n_patterns(
include('ungleich_page.urls',
namespace='ungleich_page'),
name='ungleich_page'),
url(r'^blog/', include('ungleich.urls',
namespace='ungleich')),
url(r'^', include('cms.urls'))
url(r'^cms/blog/',
include('ungleich.urls', namespace='ungleich')),
url(
r'^blog/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$',
RedirectView.as_view(pattern_name='ungleich:post-detail')),
url(r'^blog/|cms/$', RedirectView.as_view(
url=reverse_lazy('ungleich:post-list')), name='blog_list_view'),
url(r'^cms/', include('cms.urls')),
)
urlpatterns += [