diff --git a/digitalglarus/templates/cms/__init__.py b/cms_templates/__init__.py
similarity index 100%
rename from digitalglarus/templates/cms/__init__.py
rename to cms_templates/__init__.py
diff --git a/digitalglarus/templates/cms/digitalglarus/detail.html b/cms_templates/detail.html
similarity index 100%
rename from digitalglarus/templates/cms/digitalglarus/detail.html
rename to cms_templates/detail.html
diff --git a/templates/djangocms_blog/_header_post_detail.html b/cms_templates/djangocms_blog/_header_post_detail.html
similarity index 90%
rename from templates/djangocms_blog/_header_post_detail.html
rename to cms_templates/djangocms_blog/_header_post_detail.html
index 961e07d8..669de5bc 100644
--- a/templates/djangocms_blog/_header_post_detail.html
+++ b/cms_templates/djangocms_blog/_header_post_detail.html
@@ -4,6 +4,8 @@
+
\ No newline at end of file
diff --git a/cms_templates/djangocms_blog/base.html b/cms_templates/djangocms_blog/base.html
new file mode 100644
index 00000000..bbaceb61
--- /dev/null
+++ b/cms_templates/djangocms_blog/base.html
@@ -0,0 +1,19 @@
+{% extends 'base_glarus.html' %}
+
+{% block meta %}
+ {% if meta %}
+ {% include "meta_mixin/meta.html" %}
+ {% endif %}
+{% endblock meta %}
+
+
+ {% if post.main_image_id %}
+
+ {% thumbnail post.main_image post.full_image_options.size crop=post.full_image_options.crop upscale=post.full_image_options.upscale subject_location=post.main_image.subject_location as thumb %}
+
+
+ {% endif %}
+
+
+
+
+ {% block blog_meta %}
+ {# include "glarus_blog/includes/blog_meta.html" #}
+ {% endblock %}
+
+ {% endspaceless %}
+ {% render_placeholder post.content %}
+
+{% endblock content_blog %}
\ No newline at end of file
diff --git a/cms_templates/djangocms_blog/post_list.html b/cms_templates/djangocms_blog/post_list.html
new file mode 100644
index 00000000..eb1ce71b
--- /dev/null
+++ b/cms_templates/djangocms_blog/post_list.html
@@ -0,0 +1,47 @@
+{% extends "djangocms_blog/base.html" %}
+{% load i18n thumbnail %}{% spaceless %}
+
+{% block canonical_url %}
+ {% block blog_title %}
+
+
+ {% if author %}{% trans "Articles by" %} {{ author.get_full_name }}
+ {% elif archive_date %}{% trans "Archive" %} – {% if month %}{{ archive_date|date:'F' }} {% endif %}{{ year }}
+ {% elif tagged_entries %}{% trans "Tag" %} – {{ tagged_entries|capfirst }}
+ {% elif category %}{% trans "Category" %} – {{ category }}{% endif %}
+
+
+ {% endblock %}
+ {% for post in post_list %}
+ {% include "djangocms_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
+ {% empty %}
+ {% trans "No article found." %}
+ {% endfor %}
+ {% if author or archive_date or tagged_entries %}
+ {% trans "Back" %}
+ {% endif %}
+ {% if is_paginated %}
+
+
+ {% endif %}
+
+{% endblock %}
+{% endspaceless %}
\ No newline at end of file
diff --git a/digitalglarus/templates/digitalglarus/gallery.html b/cms_templates/gallery.html
similarity index 100%
rename from digitalglarus/templates/digitalglarus/gallery.html
rename to cms_templates/gallery.html
diff --git a/cms_templates/includes/blog_item.html b/cms_templates/includes/blog_item.html
new file mode 100644
index 00000000..4a23f701
--- /dev/null
+++ b/cms_templates/includes/blog_item.html
@@ -0,0 +1,33 @@
+{% load i18n thumbnail %}
+{% get_current_language as LANGUAGE_CODE %}
+
+ {% if post.main_image %}
+
+ {% thumbnail post.main_image post.full_image_options.size crop=post.full_image_options.crop upscale=post.full_image_options.upscale subject_location=post.main_image.subject_location as thumb %}
+
+
+ {% endif %}
+
+
+
+
+ {% block blog_meta %}
+ {# include "glarus_blog/includes/blog_meta.html" #}
+ {% endblock %}
+
+
+
+ {{ post.abstract| safe }}
+
+
+
+
\ No newline at end of file
diff --git a/cms_templates/includes/blog_meta.html b/cms_templates/includes/blog_meta.html
new file mode 100644
index 00000000..253dbaa7
--- /dev/null
+++ b/cms_templates/includes/blog_meta.html
@@ -0,0 +1,23 @@
+{% load i18n thumbnail %}
+
+
{% if post.main_image_id %}
@@ -18,7 +17,7 @@
{% block blog_meta %}
- include "glarus_blog/includes/blog_meta.html"
+ {# include "glarus_blog/includes/blog_meta.html" #}
{% endblock %}
{% endspaceless %}
{% render_placeholder post.content %}
-{% endblock content_blog %}
+{% endblock content_blog %}
\ No newline at end of file
diff --git a/digitalglarus/templates/glarus_blog/post_list.html b/digitalglarus/templates/glarus_blog/post_list.html
index a05ae060..cfd90d3e 100644
--- a/digitalglarus/templates/glarus_blog/post_list.html
+++ b/digitalglarus/templates/glarus_blog/post_list.html
@@ -1,4 +1,4 @@
-{% extends "glarus_blog/base.html" %}
+{% extends "base.html" %}
{% load i18n thumbnail %}{% spaceless %}
{% block canonical_url %}
{% endblock canonical_url %}
@@ -32,4 +32,4 @@
{% endif %}
{% endblock %}
-{% endspaceless %}
+{% endspaceless %}
\ No newline at end of file
diff --git a/digitalglarus/templates/index.html b/digitalglarus/templates/index.html
new file mode 100644
index 00000000..d7894fb2
--- /dev/null
+++ b/digitalglarus/templates/index.html
@@ -0,0 +1,99 @@
+{% extends "base_glarus.html" %}
+{% load staticfiles cms_tags %}
+
+{% block content %}
+
+
+
+
+
+ WELCOME TO
+
+
Digital Glarus
+
+
+
+
+
+
+
+
+
+
+
+ {% placeholder 'digital_glarus_build_a_tech_valley' %}
+
+
+
+
+ {% placeholder 'digital_glarus_build_a_tech_valley_content' %}
+
+
+
+
+
+
+
+
+
+
+ {% placeholder 'digital_glarus_a_new_area' %}
+
+
+ {% placeholder 'digital_glarus_a_new_area_content' %}
+
+
+
+
+
+
+
+
+
+ {% placeholder 'digital_glarus_why_be_interested' %}
+
+
+ {% placeholder 'digital_glarus_why_be_interested_content' %}
+
+
+
+
+
+
+
+
+ {% placeholder 'digital_glarus_where_we_are' %}
+
+
+ {% placeholder 'digital_glarus_where_we_are_content' %}
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/digitalglarus/templates/digitalglarus/letscowork.html b/digitalglarus/templates/letscowork.html
similarity index 74%
rename from digitalglarus/templates/digitalglarus/letscowork.html
rename to digitalglarus/templates/letscowork.html
index 518e1224..56f42cd6 100644
--- a/digitalglarus/templates/digitalglarus/letscowork.html
+++ b/digitalglarus/templates/letscowork.html
@@ -1,5 +1,5 @@
-{% extends "digitalglarus/base.html" %}
-{% load staticfiles %}
+{% extends "base_glarus.html" %}
+{% load staticfiles cms_tags %}
{% block title %}crowdfunding{% endblock %}
{% block content %}
@@ -18,34 +18,36 @@
+
+
- why
- glarus?
+
+ {% placeholder 'digitalglarus_why_glarus' %}
-
BEAUTIFUL
- landscape
+
+ {% placeholder 'digitalglarus_why_glarus_beautiful_landscape' %}
-
AFFORDABLE
- price
+ {% placeholder 'digitalglarus_why_glarus_affordable_price' %}
+
-
direct
- connection to zurich
+ {% placeholder 'digitalglarus_why_glarus_direct_connection_zurich' %}
+
-{% endblock %}
+{% endblock %}
\ No newline at end of file
diff --git a/digitalglarus/templates/digitalglarus/supporters.html b/digitalglarus/templates/supporters.html
similarity index 97%
rename from digitalglarus/templates/digitalglarus/supporters.html
rename to digitalglarus/templates/supporters.html
index 7f3df7e7..d4940435 100644
--- a/digitalglarus/templates/digitalglarus/supporters.html
+++ b/digitalglarus/templates/supporters.html
@@ -1,4 +1,4 @@
-{% extends "digitalglarus/base.html" %}
+{% extends "base_glarus.html" %}
{% load staticfiles %}
{% block title %}About{% endblock %}
diff --git a/digitalglarus/urls.py b/digitalglarus/urls.py
index e7002d3f..cfd3452c 100644
--- a/digitalglarus/urls.py
+++ b/digitalglarus/urls.py
@@ -3,14 +3,9 @@ from django.conf.urls import url
from . import views
urlpatterns = [
- url(r'old^$', views.index, name='index'),
- url(r'old_about$', views.about, name='about'),
url(r'old_contact$', views.contact, name='contact'),
- url(r'old_letscowork$', views.letscowork, name='letscowork'),
- url(r'old_home$', views.home, name='home'),
url(r'supporters/?$', views.supporters, name='supporters'),
- url(r'support-us/?$', views.support, name='support'),
- url(r'', views.index, name='index'),
+ url(r'support-us/?$', views.support, name='support'), # url(r'', views.index, name='index'),
url(r'blog/',views.blog,name='blog'),
url(r'^blog/(?P\w[-\w]*)/$', views.blog_detail, name='blog-detail'),
]
diff --git a/digitalglarus/views.py b/digitalglarus/views.py
index cf355600..177be233 100644
--- a/digitalglarus/views.py
+++ b/digitalglarus/views.py
@@ -83,4 +83,4 @@ def supporters(request):
context = {
'supporters': Supporter.objects.order_by('name')
}
- return render(request, 'digitalglarus/supporters.html', context)
+ return render(request, 'supporters.html', context)
diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py
index 2e69a003..f6486c56 100644
--- a/dynamicweb/settings/base.py
+++ b/dynamicweb/settings/base.py
@@ -131,13 +131,14 @@ ROOT_URLCONF = 'dynamicweb.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [
- os.path.join(PROJECT_DIR, 'membership/'), # membership template
- os.path.join(PROJECT_DIR, 'templates/'),
- os.path.join(PROJECT_DIR, 'templates/digitalglarus/partials'),
- os.path.join(PROJECT_DIR, 'templates/cms'),
- os.path.join(PROJECT_DIR, 'templates/digitalglarus'),
- ],
+ 'DIRS': [os.path.join(PROJECT_DIR,'cms_templates/'),
+ os.path.join(PROJECT_DIR,'cms_templates/djangocms_blog/'),
+ os.path.join(PROJECT_DIR,'membership'),
+ os.path.join(PROJECT_DIR,'ungleich/templates/djangocms_blog/'),
+ os.path.join(PROJECT_DIR,'ungleich/templates/cms/ungleichch'),
+ os.path.join(PROJECT_DIR,'ungleich/templates/ungleich')
+
+ ],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@@ -158,11 +159,20 @@ TEMPLATES = [
WSGI_APPLICATION = 'dynamicweb.wsgi.application'
-TDIR = os.path.join(PROJECT_DIR, 'templates')
-
-CMS_TEMPLATES_DIR = {
- 1: os.path.join(TDIR, '')
-}
+CMS_TEMPLATES = (
+ ('base_glarus.html', gettext('default')),
+ ('one_column.html', gettext('2 Column')),
+ ('two_columns.html', gettext('3 Column')),
+ ('about.html', gettext('DG.About')),
+ ('contact.html', gettext('DG.Contact')),
+ ('index.html', gettext('DG.Home')),
+ ('letscowork.html', gettext('DG.CoWork')),
+ # ('detail.html', gettext('DG.Detail')),
+ ('one_column.html', gettext('DG.OneColumn')),
+ #ungleich
+ ('blog_ungleich.html', gettext('Blog')),
+ ('page.html', gettext('Page')),
+)
DATABASES = {
'default': {
diff --git a/dynamicweb/settings/prod.py b/dynamicweb/settings/prod.py
index 3b385370..80a8d120 100644
--- a/dynamicweb/settings/prod.py
+++ b/dynamicweb/settings/prod.py
@@ -1,9 +1,10 @@
from .base import *
-DEBUG = False
+DEBUG = True
ADMINS = (
('Nico Schottelius', 'nico.schottelius@ungleich.ch'),
+ ('Raul Ascencio', 'raul.ascencio@yandex.com'),
)
# ('Sanghee Kim', 'sanghee.kim@ungleich.ch'),
diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py
index 7f06be82..1d5e5823 100644
--- a/dynamicweb/urls.py
+++ b/dynamicweb/urls.py
@@ -18,6 +18,8 @@ urlpatterns = [
# note the django CMS URLs included via i18n_patterns
urlpatterns += i18n_patterns('',
+ url(r'^$',include('ungleich.urls')),
+ url(r'^blog/',include('ungleich.urls',namespace='ungleich')),
url(r'^login/',include(membership_urls)),
url(r'^admin/', include(admin.site.urls)),
url(r'^digitalglarus/', include('digitalglarus.urls',
diff --git a/membership/models.py b/membership/models.py
index 4cb0ba6c..34390c45 100644
--- a/membership/models.py
+++ b/membership/models.py
@@ -101,7 +101,6 @@ class CustomUser(AbstractBaseUser):
return self.email
def has_perm(self, perm, obj=None):
- print(perm)
"Does the user have a specific permission?"
# Simplest possible answer: Yes, always
return True
diff --git a/templates/__init__.py b/templates/__init__.py
index eafdc433..44a1270e 100644
--- a/templates/__init__.py
+++ b/templates/__init__.py
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
-from django.utils.translation import ugettext_lazy as _
-TEMPLATES = {
- 'digitalglarus/about.html': _('DG.About'),
- 'digitalglarus/contact.html': _('DG.Contact'),
- 'digitalglarus/index.html': _('DG.Home'),
- 'digitalglarus/letscowork.html': _('DG.CoWork'),
- 'digitalglarus/one_column.html': _('DG.OneColumn'),
- 'ungleichch/blog.html': _('Blog'),
- 'ungleichch/page.html': _('Page'),
-}
+# from django.utils.translation import ugettext_lazy as _
+# TEMPLATES = {
+# 'digitalglarus/about.html': _('DG.About'),
+# 'digitalglarus/contact.html': _('DG.Contact'),
+# 'digitalglarus/index.html': _('DG.Home'),
+# 'digitalglarus/letscowork.html': _('DG.CoWork'),
+# 'digitalglarus/one_column.html': _('DG.OneColumn'),
+# 'ungleichch/blog.html': _('Blog'),
+# 'ungleichch/page.html': _('Page'),
+# }
diff --git a/templates/djangocms_blog/post_detail.html b/templates/djangocms_blog/post_detail.html
deleted file mode 100644
index 82a5be02..00000000
--- a/templates/djangocms_blog/post_detail.html
+++ /dev/null
@@ -1,37 +0,0 @@
-{% extends "glarus_blog/base.html" %}
-{% load i18n thumbnail cms_tags %}
-
-{% block meta_description %}{{ post.meta_description }}{% endblock meta_description %}
-{% block meta_keywords %}{{ post.meta_keywords }}{% endblock meta_keywords %}
-{% block canonical_url %}
- {% endblock canonical_url %}
-{% block title %}{{ post.get_title }}{% endblock %}
-
-{% block content_blog %}{% spaceless %}
-
- {% if post.main_image_id %}
-
- {% thumbnail post.main_image post.full_image_options.size crop=post.full_image_options.crop upscale=post.full_image_options.upscale subject_location=post.main_image.subject_location as thumb %}
-
-
- {% endif %}
-
-
-
-
-{# {% block blog_meta %}#}
-{# include "glarus_blog/includes/blog_meta.html"#}
-{# {% endblock %}#}
-
-{% endspaceless %}
-{% render_placeholder post.content %}
-
-{% endblock content_blog %}
\ No newline at end of file
diff --git a/templates/djangocms_blog/post_list.html b/templates/djangocms_blog/post_list.html
deleted file mode 100644
index c062eae6..00000000
--- a/templates/djangocms_blog/post_list.html
+++ /dev/null
@@ -1,35 +0,0 @@
-{% extends "glarus_blog/base.html" %}
-{% load i18n thumbnail %}{% spaceless %}
-
-{% block canonical_url %} {% endblock canonical_url %}
-
-{% block content_blog %}
-
- {% block blog_title %}
-
- {% endblock %}
- {% for post in post_list %}
- {% include "glarus_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
- {% empty %}
- {% trans "No article found." %}
- {% endfor %}
- {% if author or archive_date or tagged_entries %}
- {% trans "Back" %}
- {% endif %}
- {% if is_paginated %}
-
- {% endif %}
-
-{% endblock %}
-{% endspaceless %}
\ No newline at end of file
diff --git a/ungleich/templates/cms/ungleichch/__init__.py b/ungleich/templates/cms/ungleichch/__init__.py
index 403fbcc0..c2394ab6 100644
--- a/ungleich/templates/cms/ungleichch/__init__.py
+++ b/ungleich/templates/cms/ungleichch/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
-TEMPLATES = {
- 'blog.html': _('Blog'),
- 'page.html': _('Page'),
-}
+# TEMPLATES = {
+# 'blog_u.html': _('Blog'),
+# 'page.html': _('Page'),
+# }
diff --git a/ungleich/templates/cms/ungleichch/_header_base.html b/ungleich/templates/cms/ungleichch/_header_base.html
index 43e535f6..35e1973c 100644
--- a/ungleich/templates/cms/ungleichch/_header_base.html
+++ b/ungleich/templates/cms/ungleichch/_header_base.html
@@ -2,8 +2,8 @@