From c22b77bcc8a3c1aa6478039b707e5430652c0732 Mon Sep 17 00:00:00 2001 From: Michal Dabski Date: Tue, 14 Jun 2016 16:23:49 +0100 Subject: [PATCH 1/9] Display publication date instead of creation date for consistency with the original zinnia template publication date gives author the freedom of adding entries with past date and modifying past date. --- zinnia_bootstrap/templates/zinnia/_entry_detail_base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zinnia_bootstrap/templates/zinnia/_entry_detail_base.html b/zinnia_bootstrap/templates/zinnia/_entry_detail_base.html index 53c1c64..f6a7b87 100644 --- a/zinnia_bootstrap/templates/zinnia/_entry_detail_base.html +++ b/zinnia_bootstrap/templates/zinnia/_entry_detail_base.html @@ -27,7 +27,7 @@

{% endwith %} {% endblock entry-authors %} {% block entry-published %} - + {% endblock entry-published %} {% block entry-categories %} {% with categories=object.categories.all %} From 2863068b62924b5099c67a1acb0d4781e98dd879 Mon Sep 17 00:00:00 2001 From: Fantomas42 Date: Wed, 28 Sep 2016 21:33:18 +0200 Subject: [PATCH 2/9] Lowercase eggs --- buildout.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildout.cfg b/buildout.cfg index d1d8ce5..d228a73 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -9,7 +9,7 @@ show-picked-versions = true eggs = django django-blog-zinnia django-app-namespace-template-loader - Pillow + pillow extensions = gp.vcsdevelop develop-dir = django-apps-src vcs-update = true From 895488954a44caf8f0d97f05b6f2574a6660db6c Mon Sep 17 00:00:00 2001 From: Fantomas42 Date: Wed, 28 Sep 2016 21:47:13 +0200 Subject: [PATCH 3/9] Updating components version --- versions.cfg | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/versions.cfg b/versions.cfg index e82aa6d..52949ec 100644 --- a/versions.cfg +++ b/versions.cfg @@ -1,24 +1,27 @@ [versions] -beautifulsoup4 = 4.4.1 +beautifulsoup4 = 4.5.1 buildout-versions-checker = 1.9.3 -django = 1.9.6 -django-app-namespace-template-loader = 0.4 -django-contrib-comments = 1.7.0 -django-mptt = 0.8.2 -django-tagging = 0.4.3 +configparser = 3.5.0 +django = 1.10.1 +django-app-namespace-template-loader = 0.4.1 +django-contrib-comments = 1.7.3 +django-mptt = 0.8.6 +django-tagging = 0.4.5 django-xmlrpc = 0.1.5 -djangorecipe = 2.1.2 -flake8 = 2.5.4 +djangorecipe = 2.2.1 +enum34 = 1.1.6 +flake8 = 3.0.4 futures = 3.0.5 gp.vcsdevelop = 2.2.3 -mccabe = 0.4.0 +mccabe = 0.5.2 mots-vides = 2015.5.11 packaging = 16.7 -pep8 = 1.7.0 -pillow = 3.2.0 -pyflakes = 1.0.0 -pyparsing = 2.1.1 -pytz = 2016.4 +pillow = 3.3.1 +pycodestyle = 2.0.0 +pyflakes = 1.2.3 +pyparsing = 2.1.9 +pytz = 2016.6.1 +regex = 2016.9.22 six = 1.10.0 -zc.buildout = 2.5.1 +zc.buildout = 2.5.3 zc.recipe.egg = 2.0.3 From 95d957947de2dc15233890d7a43286ad38a3f6bf Mon Sep 17 00:00:00 2001 From: Fantomas42 Date: Wed, 28 Sep 2016 22:14:44 +0200 Subject: [PATCH 4/9] Update the demo --- demo_zinnia_bootstrap/settings.py | 49 ++++++++++++++++++------------- demo_zinnia_bootstrap/urls.py | 3 +- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/demo_zinnia_bootstrap/settings.py b/demo_zinnia_bootstrap/settings.py index fe71e59..f9d4fd8 100644 --- a/demo_zinnia_bootstrap/settings.py +++ b/demo_zinnia_bootstrap/settings.py @@ -4,7 +4,6 @@ gettext = lambda s: s DEBUG = True -TEMPLATE_DEBUG = DEBUG DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', @@ -47,36 +46,46 @@ ('ca', gettext('Catalan')), ('tr', gettext('Turkish')), ('sv', gettext('Swedish')), + ('is', gettext('Icelandic')), ('hr_HR', gettext('Croatian')), ('pt_BR', gettext('Brazilian Portuguese')), - ('fi_FI', gettext('Finnish (Finland)')), - ('zh_CN', gettext('Simplified Chinese')), + ('fa_IR', gettext('Persian')), + ('fi_FI', gettext('Finnish')), + ('uk_UA', gettext('Ukrainian')), + ('zh-hans', gettext('Simplified Chinese')), ) -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.admindocs.middleware.XViewMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', -) + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] ROOT_URLCONF = 'demo_zinnia_bootstrap.urls' -TEMPLATE_LOADERS = ( - 'app_namespace.Loader', - 'django.template.loaders.app_directories.Loader' -) - -TEMPLATE_CONTEXT_PROCESSORS = ( - 'django.contrib.auth.context_processors.auth', - 'django.core.context_processors.i18n', - 'django.core.context_processors.request', - 'django.contrib.messages.context_processors.messages', - 'zinnia.context_processors.version', -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'OPTIONS': { + 'loaders': [ + 'app_namespace.Loader', + 'django.template.loaders.app_directories.Loader', + ], + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.i18n', + 'django.template.context_processors.request', + 'django.contrib.messages.context_processors.messages', + 'zinnia.context_processors.version', + ] + } + } +] INSTALLED_APPS = ( 'django.contrib.auth', @@ -94,5 +103,3 @@ 'zinnia_bootstrap', 'zinnia', ) - -SILENCED_SYSTEM_CHECKS = ['1_6.W001'] diff --git a/demo_zinnia_bootstrap/urls.py b/demo_zinnia_bootstrap/urls.py index 902a767..cdbd1a9 100644 --- a/demo_zinnia_bootstrap/urls.py +++ b/demo_zinnia_bootstrap/urls.py @@ -18,14 +18,13 @@ from zinnia.sitemaps import CategorySitemap from zinnia.sitemaps import AuthorSitemap -admin.autodiscover() urlpatterns = [ url(r'^$', RedirectView.as_view(url='/blog/', permanent=True)), url(r'^blog/', include('zinnia.urls', namespace='zinnia')), url(r'^comments/', include('django_comments.urls')), url(r'^i18n/', include('django.conf.urls.i18n')), - url(r'^admin/', include(admin.site.urls)), + url(r'^admin/', admin.site.urls), ] sitemaps = { From 01c4bbd0b632f11fa33de262a9dfc8bdce1feed4 Mon Sep 17 00:00:00 2001 From: Fantomas42 Date: Wed, 28 Sep 2016 22:29:09 +0200 Subject: [PATCH 5/9] Use h1 accordingly to original templates --- zinnia_bootstrap/templates/zinnia/author_list.html | 2 +- zinnia_bootstrap/templates/zinnia/category_list.html | 2 +- zinnia_bootstrap/templates/zinnia/tag_list.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zinnia_bootstrap/templates/zinnia/author_list.html b/zinnia_bootstrap/templates/zinnia/author_list.html index ef65eea..0ea2af0 100644 --- a/zinnia_bootstrap/templates/zinnia/author_list.html +++ b/zinnia_bootstrap/templates/zinnia/author_list.html @@ -2,7 +2,7 @@ {% load i18n %} {% block content %} -

{% trans "Author list" %}

+

{% trans "Author list" %}

    {% for object in object_list %} diff --git a/zinnia_bootstrap/templates/zinnia/category_list.html b/zinnia_bootstrap/templates/zinnia/category_list.html index 9eec472..ab0d3b4 100644 --- a/zinnia_bootstrap/templates/zinnia/category_list.html +++ b/zinnia_bootstrap/templates/zinnia/category_list.html @@ -2,7 +2,7 @@ {% load i18n mptt_tags %} {% block content %} -

    {% trans "Category list" %}

    +

    {% trans "Category list" %}

      {% recursetree object_list %} diff --git a/zinnia_bootstrap/templates/zinnia/tag_list.html b/zinnia_bootstrap/templates/zinnia/tag_list.html index 1c7aba0..3bccde1 100644 --- a/zinnia_bootstrap/templates/zinnia/tag_list.html +++ b/zinnia_bootstrap/templates/zinnia/tag_list.html @@ -2,7 +2,7 @@ {% load i18n %} {% block content %} -

      {% trans "Tag list" %}

      +

      {% trans "Tag list" %}

        {% for object in object_list %} From 7ee4a513d6b2d97a200d9f25c2043c79abea12e2 Mon Sep 17 00:00:00 2001 From: Fantomas42 Date: Wed, 28 Sep 2016 22:38:59 +0200 Subject: [PATCH 6/9] Update category_list template accordingly to the original template, close #21 --- .../templates/zinnia/category_list.html | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/zinnia_bootstrap/templates/zinnia/category_list.html b/zinnia_bootstrap/templates/zinnia/category_list.html index ab0d3b4..4ca273b 100644 --- a/zinnia_bootstrap/templates/zinnia/category_list.html +++ b/zinnia_bootstrap/templates/zinnia/category_list.html @@ -1,28 +1,23 @@ {% extends "zinnia:zinnia/category_list.html" %} -{% load i18n mptt_tags %} +{% load i18n %} {% block content %}

        {% trans "Category list" %}

        -
          - {% recursetree object_list %} +
            + {% for object in object_list %}
          • - {{ node }} + {{ object }} - {% blocktrans count entry_count=node.entries_published.count %}{{ entry_count }} entry{% plural %}{{ entry_count }} entries{% endblocktrans %} + {% blocktrans count entry_count=object.count_entries_published %}{{ entry_count }} entry{% plural %}{{ entry_count }} entries{% endblocktrans %} - {% if node.description %}

            {{ node.description|striptags|safe }}

            {% endif %} - {% if not node.is_leaf_node %} -
              - {{ children }} -
            - {% endif %} + {% if object.description %}

            {{ object.description|striptags|safe }}

            {% endif %}
          • - {% endrecursetree %} - {% if not object_list %} -
          • + {% empty %} +
          • {% trans "No categories yet." %}
          • - {% endif %} + {% endfor %}
          {% endblock content %} From 9609e73daa92d736f55c50ce211bf408ba5a1b3a Mon Sep 17 00:00:00 2001 From: Fantomas42 Date: Thu, 29 Sep 2016 10:39:52 +0200 Subject: [PATCH 7/9] Update sitemap accordingly to the original template --- .../templates/zinnia/sitemap.html | 45 ++----------------- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/zinnia_bootstrap/templates/zinnia/sitemap.html b/zinnia_bootstrap/templates/zinnia/sitemap.html index 4233bcd..bb27340 100644 --- a/zinnia_bootstrap/templates/zinnia/sitemap.html +++ b/zinnia_bootstrap/templates/zinnia/sitemap.html @@ -2,12 +2,12 @@ {% load i18n zinnia mptt_tags %} {% block content %} -

          {% trans "Sitemap" %}

          +

          {% trans "Sitemap" %}

          -

          {% trans "Entries per categories" %}

          +

          {% trans "Entries per categories" %}

          {% for category in categories %} -

          {{ category }}

          +

          {{ category }}

            {% for entry in category.entries_published.all %}
          • @@ -27,45 +27,8 @@

            {{ category }}

            {% endfor %}
          -
          -

          {% trans "All the entries" %}

          -
            - {% for entry in entries %} -
          • - {{ entry.title }} - - {{ entry.creation_date|date:"SHORT_DATE_FORMAT" }} - {% with comment_count=entry.comments.count %} - - {{ comment_count }} {% trans "comment" %}{{ comment_count|pluralize }} - - {% endwith %} -
          • - {% empty %} -
          • - {% trans "No entries yet." %} -
          • - {% endfor %} -
          -
          - -
          -

          {% trans "Categories" %}

          - {% for category, structure in categories|tree_info %} - {% if structure.new_level %}
          • {% else %}
          • {% endif %} - {{ category.title }} - {% blocktrans count entry_count=category.entries_published.count %}{{ entry_count }} entry{% plural %}{{ entry_count }} entries{% endblocktrans %} - {% for level in structure.closed_levels %}
          {% endfor %} - {% empty %} -
            -
          • - {% trans "No categories yet." %} -
          • -
          - {% endfor %} -
          -
          -

          {% trans "Monthly archives" %}

          +

          {% trans "Monthly archives" %}

          {% get_archives_entries %}
          {% endblock content %} From d5563c6e74d876ecee183a8bc500b4f857eb74b8 Mon Sep 17 00:00:00 2001 From: Fantomas42 Date: Thu, 29 Sep 2016 10:57:46 +0200 Subject: [PATCH 8/9] Update the template --- zinnia_bootstrap/templates/zinnia/entry_search.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/zinnia_bootstrap/templates/zinnia/entry_search.html b/zinnia_bootstrap/templates/zinnia/entry_search.html index 5eb3b22..902da24 100644 --- a/zinnia_bootstrap/templates/zinnia/entry_search.html +++ b/zinnia_bootstrap/templates/zinnia/entry_search.html @@ -2,10 +2,17 @@ {% load i18n zinnia %} {% block content-title %} -

          {% trans "Search results for" %} '{{ pattern }}'

          +

          {% blocktrans %}Search results for '{{ pattern }}'{% endblocktrans %}

          {% if error %}

          {{ error }}

          +{% else %} +

          + + + {% blocktrans %}RSS feed of search results for '{{ pattern }}'{% endblocktrans %} + +

          {% endif %} {% if object_list %} @@ -13,12 +20,14 @@

          {% trans "Search results for" %} '{{ pattern }}'

          {% blocktrans count entry_count=paginator.count %}{{ entry_count }} entry found{% plural %}{{ entry_count }} entries found{% endblocktrans %}

          {% endif %} + {% endblock content-title %} {% block content-loop %} {% if not error %} {% for object in object_list %} - {% include object.content_template with object_content=object.html_preview continue_reading=1 %} + {% zinnia_loop_template object.content_template as template %} + {% include template with object_content=object.html_preview continue_reading=1 %} {% empty %}

          {% trans "Nothing found." %}

          {% endfor %} From 6a2647c27497b4295716329d8d895689810fa30a Mon Sep 17 00:00:00 2001 From: Fantomas42 Date: Thu, 29 Sep 2016 11:03:26 +0200 Subject: [PATCH 9/9] Bumping to version 0.5.1 --- zinnia_bootstrap/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zinnia_bootstrap/__init__.py b/zinnia_bootstrap/__init__.py index 654e8fe..dffc9b5 100644 --- a/zinnia_bootstrap/__init__.py +++ b/zinnia_bootstrap/__init__.py @@ -1,5 +1,5 @@ """zinnia_bootstrap""" -__version__ = '0.5' +__version__ = '0.5.1' __license__ = 'BSD License' __author__ = 'Fantomas42'