Merge branch 'master' into task/4379/price_without_vat
This commit is contained in:
commit
2a08c1efd3
3 changed files with 20 additions and 8 deletions
|
@ -1,3 +1,5 @@
|
|||
1.6.4: 2018-04-06
|
||||
* #4362: [cms] Fix the need of dummy home page for different CMS-based sites
|
||||
1.6.3: 2018-04-05
|
||||
* #4377: [cms] header btn external link fix
|
||||
* #4378: [dcl cms] update CMS Integration to have different content for different domains
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from cms.models.pagemodel import Page
|
||||
from django.conf.urls import include, url
|
||||
from django.contrib import admin
|
||||
from django.contrib.sites.models import Site
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
from django.conf.urls.static import static
|
||||
from django.views import i18n, static as static_view
|
||||
|
@ -35,8 +37,11 @@ urlpatterns += i18n_patterns(
|
|||
)
|
||||
|
||||
# note the django CMS URLs included via i18n_patterns
|
||||
REDIRECT_TO_CMS = False
|
||||
if Page.objects.filter(site_id=Site.objects.get_current().id).count():
|
||||
REDIRECT_TO_CMS = True
|
||||
|
||||
urlpatterns += i18n_patterns(
|
||||
url(r'^$', LandingView.as_view()),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^datacenterlight/',
|
||||
include('datacenterlight.urls', namespace="datacenterlight")),
|
||||
|
@ -46,19 +51,22 @@ urlpatterns += i18n_patterns(
|
|||
url(r'^membership/', include(membership_urls)),
|
||||
url(r'^digitalglarus/', include('digitalglarus.urls',
|
||||
namespace="digitalglarus")),
|
||||
# url(r'^blog/', include('ungleich.urls', namespace='ungleich')),
|
||||
url(r'^',
|
||||
include('ungleich_page.urls',
|
||||
namespace='ungleich_page'),
|
||||
name='ungleich_page'),
|
||||
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'^blog/$', RedirectView.as_view(
|
||||
url=reverse_lazy('ungleich:post-list')
|
||||
), name='blog_list_view'
|
||||
),
|
||||
url(r'^cms/', include('cms.urls')),
|
||||
url(r'^$', RedirectView.as_view(url='/cms') if REDIRECT_TO_CMS
|
||||
else LandingView.as_view()),
|
||||
url(r'^',
|
||||
include('ungleich_page.urls',
|
||||
namespace='ungleich_page'),
|
||||
name='ungleich_page'),
|
||||
)
|
||||
|
||||
urlpatterns += [
|
||||
|
|
|
@ -3,10 +3,12 @@ from django.conf.urls import include, url
|
|||
from django.conf.urls.i18n import i18n_patterns
|
||||
from django.contrib import admin
|
||||
from django.views import static as static_view
|
||||
from django.views.generic import RedirectView
|
||||
|
||||
urlpatterns = i18n_patterns(
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^cms/', include('cms.urls')),
|
||||
url(r'^$', RedirectView.as_view(url='/cms')),
|
||||
)
|
||||
|
||||
urlpatterns += [
|
||||
|
|
Loading…
Reference in a new issue