Merge master into task/4362/fix_need_of_cms_dummy_page

This commit is contained in:
PCoder 2018-04-03 22:50:00 +02:00
parent 73c49aa964
commit e0df641dbd
3 changed files with 19 additions and 36 deletions

View file

@ -1,5 +1,6 @@
Next: 1.6.2: 2018-04-01:
* bugfix: [dcl] Fix user activation email style; add/correct some DE text * bgfix: [dcl] Fix user activation email style; add/correct some DE text
* #4373: [dcl] update footer menu for pw reset/login/signup/activation request pages
1.6.1: 2018-03-28 1.6.1: 2018-03-28
* bgfix: fix header slider interval issue * bgfix: fix header slider interval issue
* #4315: [cms] navbar consistency from cms page to static page * #4315: [cms] navbar consistency from cms page to static page

View file

@ -3,37 +3,14 @@
<footer> <footer>
<div class="container"> <div class="container">
<ul class="list-inline"> <ul class="list-inline">
{% if request.resolver_match.url_name != "index" %}
<li>
<a href="{% url 'datacenterlight:index' %}">{% trans "Home" %}</a>
</li>
<li class="footer-menu-divider">&sdot;</li>
{% endif %}
<li> <li>
<a class="url-init" href="{% url 'datacenterlight:index' %}#how">{% trans "Highlights" %}</a> <a class="url-init" href="{% url 'datacenterlight:index' %}">{% trans "Home" %}</a>
</li> </li>
<li> <li class="footer-menu-divider">&sdot;</li>
<a class="url-init" href="{% url 'datacenterlight:index' %}#your">{% trans "Scale out" %}</a>
</li>
<li>
<a class="url-init" href="{% url 'datacenterlight:index' %}#our">{% trans "Reliable and light" %}</a>
</li>
{% if request.resolver_match.url_name != "index" %}
<li>
<a class="url-init" href="{% url 'datacenterlight:index' %}#price">{% trans "Pricing" %}</a>
</li>
<li class="footer-menu-divider">&sdot;</li>
{% else %}
<li>
<a class="url-init" href="{% url 'datacenterlight:index' %}#price">{% trans "Order VM" %}</a>
</li>
{% endif %}
<li> <li>
<a class="url-init" href="{% url 'datacenterlight:index' %}#contact">{% trans "Contact" %}</a> <a class="url-init" href="{% url 'datacenterlight:index' %}#contact">{% trans "Contact" %}</a>
</li> </li>
{% if request.resolver_match.url_name != "index" %} <li class="footer-menu-divider">&sdot;</li>
<li class="footer-menu-divider">&sdot;</li>
{% endif %}
<li> <li>
<a class="url-init" href="/cms/terms-of-service">{% trans "Terms of Service" %}</a> <a class="url-init" href="/cms/terms-of-service">{% trans "Terms of Service" %}</a>
</li> </li>

View file

@ -1,5 +1,7 @@
from cms.models.pagemodel import Page
from django.conf.urls import include, url from django.conf.urls import include, url
from django.contrib import admin from django.contrib import admin
from django.contrib.sites.models import Site
from django.conf.urls.i18n import i18n_patterns from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static from django.conf.urls.static import static
from django.views import i18n, static as static_view 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 # 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( urlpatterns += i18n_patterns(
url(r'^$', LandingView.as_view()),
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
url(r'^datacenterlight/', url(r'^datacenterlight/',
include('datacenterlight.urls', namespace="datacenterlight")), include('datacenterlight.urls', namespace="datacenterlight")),
@ -46,19 +51,19 @@ urlpatterns += i18n_patterns(
url(r'^membership/', include(membership_urls)), url(r'^membership/', include(membership_urls)),
url(r'^digitalglarus/', include('digitalglarus.urls', url(r'^digitalglarus/', include('digitalglarus.urls',
namespace="digitalglarus")), 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/', url(r'^cms/blog/',
include('ungleich.urls', namespace='ungleich')), include('ungleich.urls', namespace='ungleich')),
url( url(
r'^blog/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$', 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')), RedirectView.as_view(pattern_name='ungleich:post-detail')),
url(r'^blog/$', RedirectView.as_view( url(r'^blog/$', RedirectView.as_view(
url=reverse_lazy('ungleich:post-list')), name='blog_list_view'), url=reverse_lazy('ungleich:post-list')
url(r'^cms/', include('cms.urls')), ), name='blog_list_view'
),
url(r'^cms/', include('cms.urls'), name="cms"),
url(r'^$', RedirectView.as_view(url=reverse_lazy('dynamicweb:cms'))
if REDIRECT_TO_CMS else LandingView.as_view()
),
) )
urlpatterns += [ urlpatterns += [