diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py index 84f3fb3d..2adce271 100644 --- a/dynamicweb/urls.py +++ b/dynamicweb/urls.py @@ -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\d{4})/(?P\d{1,2})/(?P\d{1,2})/(?P\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 += [