diff --git a/digitalglarus/cms_plugins.py b/digitalglarus/cms_plugins.py index 703176a2..afa27433 100644 --- a/digitalglarus/cms_plugins.py +++ b/digitalglarus/cms_plugins.py @@ -1,5 +1,6 @@ from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from cms.wizards import wizard_base from .models import DGGalleryPlugin, DGSupportersPlugin, Supporter from django.utils.translation import ugettext as _ @@ -29,5 +30,7 @@ class CMSSupportersPlugin(CMSPluginBase): }) return context + + plugin_pool.register_plugin(CMSGalleryPlugin) plugin_pool.register_plugin(CMSSupportersPlugin) diff --git a/digitalglarus/templates/digitalglarus/base.html b/digitalglarus/templates/digitalglarus/base.html index 61344ffe..56bdf3a0 100644 --- a/digitalglarus/templates/digitalglarus/base.html +++ b/digitalglarus/templates/digitalglarus/base.html @@ -23,8 +23,10 @@ - - + + {% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %} {% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %} @@ -35,83 +37,89 @@ - + - {% cms_toolbar %} -
Digital Glarus
-
The Swiss IT Valley | Schwanden, 8762 GL Switzerland | From 2015.10.13
- - - +{% cms_toolbar %} +
Digital Glarus
+
The Swiss IT Valley | Schwanden, 8762 GL Switzerland | From 2015.10.13
+ + - +
+ {% block content %} {% endblock %} +
+ - - + - - - + + - - + + + + + diff --git a/digitalglarus/templates/glarus_blog/includes/blog_item.html b/digitalglarus/templates/glarus_blog/includes/blog_item.html index 0dcb1670..2a6dd122 100644 --- a/digitalglarus/templates/glarus_blog/includes/blog_item.html +++ b/digitalglarus/templates/glarus_blog/includes/blog_item.html @@ -10,7 +10,7 @@

- + {{ post.title }} @@ -28,6 +28,6 @@

diff --git a/digitalglarus/templates/glarus_blog/post_detail.html b/digitalglarus/templates/glarus_blog/post_detail.html index e07aa70e..cd89f8f2 100644 --- a/digitalglarus/templates/glarus_blog/post_detail.html +++ b/digitalglarus/templates/glarus_blog/post_detail.html @@ -7,6 +7,7 @@ {% block title %}{{ post.get_title }}{% endblock %} {% block content_blog %}{% spaceless %} + {% debug %}
{% if post.main_image_id %}
@@ -17,7 +18,7 @@

- + {{ post.title }} @@ -26,7 +27,7 @@


{% block blog_meta %} - {# include "glarus_blog/includes/blog_meta.html" #} + include "glarus_blog/includes/blog_meta.html" {% endblock %}
{% endspaceless %} diff --git a/digitalglarus/urls.py b/digitalglarus/urls.py index 14f9ba86..9a2b3f5f 100644 --- a/digitalglarus/urls.py +++ b/digitalglarus/urls.py @@ -1,5 +1,4 @@ -from django.conf.urls import url,include -from djangocms_blog.urls import urlpatterns as blog_patterns +from django.conf.urls import url from . import views @@ -10,6 +9,7 @@ urlpatterns = [ 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'blog/',views.blog, name='blog'), - url(r'^blog/(?P\w[-\w]*)/$', views.blog_detail, name='blog-detail'), + 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 86856b6f..ca08f865 100644 --- a/digitalglarus/views.py +++ b/digitalglarus/views.py @@ -6,6 +6,7 @@ from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.utils.translation import get_language from djangocms_blog.models import Post +from django.core.urlresolvers import resolve from .models import Message, Supporter diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index f7e64de3..b98fc47e 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -75,23 +75,24 @@ INSTALLED_APPS = ( #2nd migrate # django-cms plugins -# 'djangocms_file', -# 'djangocms_picture', -# 'djangocms_video', -# 'djangocms_flash', -# 'djangocms_googlemap', -# 'djangocms_inherit', -# 'djangocms_link', -# 'djangocms_teaser', -# 'djangocms_page_meta', -# 'djangocms_text_ckeditor', -# 'djangocms_admin_style', -# 'cmsplugin_filer_file', -# 'cmsplugin_filer_folder', -# 'cmsplugin_filer_link', -# 'cmsplugin_filer_teaser', -# 'cmsplugin_filer_video', + 'djangocms_file', + 'djangocms_picture', + 'djangocms_video', + 'djangocms_flash', + 'djangocms_googlemap', + 'djangocms_inherit', + 'djangocms_link', + 'djangocms_teaser', + 'djangocms_page_meta', + 'djangocms_text_ckeditor', + 'djangocms_admin_style', + 'cmsplugin_filer_file', + 'cmsplugin_filer_folder', + 'cmsplugin_filer_link', + 'cmsplugin_filer_teaser', + 'cmsplugin_filer_video', + # #blog # versioning 'reversion', @@ -99,6 +100,8 @@ INSTALLED_APPS = ( 'ungleich', 'hosting', 'digitalglarus', + 'django_extensions', + 'debug_toolbar' ) MIDDLEWARE_CLASSES = ( diff --git a/templates/cms/digitalglarus/partials/menu.html b/templates/cms/digitalglarus/partials/menu.html index 7223713f..b7d223fa 100644 --- a/templates/cms/digitalglarus/partials/menu.html +++ b/templates/cms/digitalglarus/partials/menu.html @@ -18,9 +18,6 @@
diff --git a/templates/djangocms_blog/post_detail.html b/templates/djangocms_blog/post_detail.html index 62216d0f..caadd70d 100644 --- a/templates/djangocms_blog/post_detail.html +++ b/templates/djangocms_blog/post_detail.html @@ -1,21 +1,37 @@ -{% extends "djangocms_blog/base.html" %} +{% extends "glarus_blog/base.html" %} {% load i18n thumbnail cms_tags %} -{% load url from future %} + {% 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 %}{% page_attribute "page_title" %} - {{ post.get_title }}{% endblock %} - -{% block base_header %} -{% include "djangocms_blog/_header_post_detail.html" %} -{% endblock %} - -{% block content_blog %} -
- {% if use_placeholder %} -
{% render_placeholder post.content %}
- {% else %} -
{% render_model post "post_text" "post_text" %}
- {% endif %} +{% 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 %} + {{ post.main_image.default_alt_text }} +
+ {% endif %} +
+
+

+ + {{ post.title }} + + + {{ post.date_created }} + +

+
+{# {% block blog_meta %}#} +{# include "glarus_blog/includes/blog_meta.html"#} +{# {% endblock %}#} +
+{% endspaceless %} +
{{ post.abstract| safe }}
-{% endblock content_blog %} +{% 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 index 2fae4741..c062eae6 100644 --- a/templates/djangocms_blog/post_list.html +++ b/templates/djangocms_blog/post_list.html @@ -1,47 +1,35 @@ -{% extends "djangocms_blog/base.html" %} +{% extends "glarus_blog/base.html" %} {% load i18n thumbnail %}{% spaceless %} {% block canonical_url %}{% endblock canonical_url %} {% block content_blog %}
- {% 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 %} - -
    - {% if page_obj.has_previous %} - + {% 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 page_obj.has_next %} - + {% if is_paginated %} + {% endif %} -
- {% endif %}
{% endblock %} -{% endspaceless %} +{% endspaceless %} \ No newline at end of file