From: Emilie Date: Fri, 8 Jul 2016 09:57:28 +0000 (+0200) Subject: Task #74 #84: Article list and detail view X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=53bd031fea907cb70f3a95be929174be957ecbf9;p=mezzo.git Task #74 #84: Article list and detail view --- diff --git a/app/local_settings.py b/app/local_settings.py index 96e92ada..4b3d83c9 100644 --- a/app/local_settings.py +++ b/app/local_settings.py @@ -137,6 +137,3 @@ DEBUG_TOOLBAR_PANELS = [ 'debug_toolbar.panels.logging.LoggingPanel', 'debug_toolbar.panels.redirects.RedirectsPanel', ] - -# slug -BLOG_SLUG = 'article' diff --git a/app/organization/magazine/models.py b/app/organization/magazine/models.py index 412eaf01..1e952fb0 100644 --- a/app/organization/magazine/models.py +++ b/app/organization/magazine/models.py @@ -16,9 +16,17 @@ class Article(BlogPost): sub_title = models.CharField(_('sub title'), blank=True, max_length=1000) + def get_absolute_url(self): + return reverse("magazine-article-detail", kwargs={"slug": self.slug}) + class Meta: verbose_name = _('article') + class Meta: + verbose_name = _("article") + verbose_name_plural = _("article") + ordering = ("-publish_date",) + class Category(Named): """(Category description)""" diff --git a/app/organization/magazine/urls.py b/app/organization/magazine/urls.py index 08d9963b..b61c0bf9 100644 --- a/app/organization/magazine/urls.py +++ b/app/organization/magazine/urls.py @@ -1,28 +1,20 @@ from __future__ import unicode_literals -<<<<<<< HEAD from django.conf.urls import patterns, include, url from django.conf.urls.i18n import i18n_patterns from django.contrib import admin -======= -import django.views.i18n -from django.conf.urls import patterns, include, url -from django.conf.urls.i18n import i18n_patterns ->>>>>>> 0f089a57b9482bec7a88f169e5d5fe2688c538c4 from mezzanine.core.views import direct_to_template from mezzanine.conf import settings -<<<<<<< HEAD from organization.magazine.views import * +_slash = "/" if settings.APPEND_SLASH else "" urlpatterns = [ - url(r'^article/$', ArticleListView.as_view(), name="magazine-article-list"), - url(r'^article/detail/(?P.*)/$', ArticleDetailView.as_view(), name="magazine-article-detail"), -======= - -urlpatterns = [ + # url(r'^article/$', ArticleListView.as_view(), name="magazine-article-list"), + # url(r'^article/detail/(?P.*)/$', ArticleDetailView.as_view(), name="magazine-article-detail"), ->>>>>>> 0f089a57b9482bec7a88f169e5d5fe2688c538c4 + url("^article/$", ArticleListView.as_view(), name="magazine-article-list"), + url("^article/detail/(?P.*)%s$" % _slash, ArticleDetailView.as_view(), name="magazine-article-detail"), ] diff --git a/app/organization/magazine/views.py b/app/organization/magazine/views.py index c3dc0f46..aa7d6ec2 100644 --- a/app/organization/magazine/views.py +++ b/app/organization/magazine/views.py @@ -1,4 +1,7 @@ from django.shortcuts import render +from django.utils import timezone +from django.views.generic import DetailView, ListView, TemplateView + from organization.magazine.models import Article from organization.core.views import SlugMixin @@ -13,20 +16,30 @@ class ArticleDetailView(SlugMixin, DetailView): context = super(ArticleDetailView, self).get_context_data(**kwargs) return context +class ArticleListView(SlugMixin, ListView): + + model = Article + template_name='magazine/article/article_list.html' + # context_object_name = 'article' + + def get_context_data(self, **kwargs): + context = super(ArticleListView, self).get_context_data(**kwargs) + return context + -def blog_post_detail(request, slug, year=None, month=None, day=None, - template="blog/blog_post_detail.html", - extra_context=None): - """. Custom templates are checked for using the name - ``blog/blog_post_detail_XXX.html`` where ``XXX`` is the blog - posts's slug. - """ - blog_posts = BlogPost.objects.published( - for_user=request.user).select_related() - blog_post = get_object_or_404(blog_posts, slug=slug) - related_posts = blog_post.related_posts.published(for_user=request.user) - context = {"blog_post": blog_post, "editable_obj": blog_post, - "related_posts": related_posts} - context.update(extra_context or {}) - templates = [u"blog/blog_post_detail_%s.html" % str(slug), template] - return TemplateResponse(request, templates, context) +# def blog_post_detail(request, slug, year=None, month=None, day=None, +# template="blog/blog_post_detail.html", +# extra_context=None): +# """. Custom templates are checked for using the name +# ``blog/blog_post_detail_XXX.html`` where ``XXX`` is the blog +# posts's slug. +# """ +# blog_posts = BlogPost.objects.published( +# for_user=request.user).select_related() +# blog_post = get_object_or_404(blog_posts, slug=slug) +# related_posts = blog_post.related_posts.published(for_user=request.user) +# context = {"blog_post": blog_post, "editable_obj": blog_post, +# "related_posts": related_posts} +# context.update(extra_context or {}) +# templates = [u"blog/blog_post_detail_%s.html" % str(slug), template] +# return TemplateResponse(request, templates, context) diff --git a/app/templates/festival/artist_detail.html b/app/templates/festival/artist_detail.html new file mode 100644 index 00000000..95ca5cd9 --- /dev/null +++ b/app/templates/festival/artist_detail.html @@ -0,0 +1,43 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags featured_tags %} + +{% block title %} +{{ artist.name }} +{% endblock %} + +{% block main %} +
+

+ {% if artist.photo %} +

+ + +
+ {% endif %} + {{ artist.bio|safe }} +
+

+
+ +
+{% if artist.events.all %} +

{% trans "Also discover" %}


+
+
+ {% for event in artist.events.all|no_parents %} + {% include 'agenda/includes/event_card.html' %} + {% endfor %} + {% for video in artist.videos.all %} + {% include 'festival/inc/video_card.html' %} + {% endfor %} + {% with artist.events.all|unique_posts as posts %} + {% for post in posts %} + {% include 'blog/includes/post_card.html' %} + {% endfor %} + {% endwith %} +
+{% endif %} +{% endblock %} diff --git a/app/templates/festival/artist_list.html b/app/templates/festival/artist_list.html new file mode 100644 index 00000000..ba6e6a63 --- /dev/null +++ b/app/templates/festival/artist_list.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags %} + +{% block title %} + {% trans "Artists" %} +{% endblock %} + +{% block main %} +
+
+ {% for artist in object_list %} + {% include "festival/inc/artist_card.html" %} + {% endfor %} +
+{% endblock %} diff --git a/app/templates/festival/inc/artist_card.html b/app/templates/festival/inc/artist_card.html new file mode 100644 index 00000000..21c3babe --- /dev/null +++ b/app/templates/festival/inc/artist_card.html @@ -0,0 +1,16 @@ +{% load i18n pages_tags mezzanine_tags %} + + diff --git a/app/templates/festival/inc/audio_playlist.html b/app/templates/festival/inc/audio_playlist.html new file mode 100644 index 00000000..83478730 --- /dev/null +++ b/app/templates/festival/inc/audio_playlist.html @@ -0,0 +1,26 @@ +{% load staticfiles %} + +
+ {% for audio in playlist.audios.all %} + {% if forloop.first %} +
+ + + {{ audio.title }} + +
+ + {% endif %} +
diff --git a/app/templates/festival/inc/video_card.html b/app/templates/festival/inc/video_card.html new file mode 100644 index 00000000..3d5bb2ed --- /dev/null +++ b/app/templates/festival/inc/video_card.html @@ -0,0 +1,11 @@ +{% load i18n %} + +
+
+ +
+
+

{{ video.title }}

+
+ {% trans "Play the video" %} +
diff --git a/app/templates/festival/video_detail.html b/app/templates/festival/video_detail.html new file mode 100644 index 00000000..b954cc14 --- /dev/null +++ b/app/templates/festival/video_detail.html @@ -0,0 +1,52 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags %} + +{% block title %} +{{ video.title }} +{% endblock %} + +{% block main %} + +
+ {{ video.content|safe }} +
+ +
+ +
+ +{% with video as object %} + {% include "includes/share_buttons.html" %} +{% endwith %} + +{% if video.event %} +
+

{% trans 'Also discover' %}

+
+
+ {% with video.event as event %} + {% include 'agenda/includes/event_card.html' %} + {% for artist in video.artists.all %} + {% include "festival/inc/artist_card.html" %} + {% endfor %} + {% for v in event.videos.all %} + {% if v != video %} + {% with v as video %} + {% include 'festival/inc/video_card.html' %} + {% endwith %} + {% endif %} + {% endfor %} + {% for post in event.blog_posts.all %} + {% include 'blog/includes/post_card.html' %} + {% endfor %} + {% endwith %} + +
+
+{% endif %} + +{% endblock %} diff --git a/app/templates/festival/video_list.html b/app/templates/festival/video_list.html new file mode 100644 index 00000000..f951aa2a --- /dev/null +++ b/app/templates/festival/video_list.html @@ -0,0 +1,30 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags featured_tags %} + +{% block title %} + {% trans "Videos" %} +{% endblock %} + +{% block main %} + +{% if categories %} +
    +{% for cat in categories %} +
  • + {{ cat }} ({{ cat.count }}) +
  • +{% endfor %} +
+
+{% endif %} + +
+
+ {% for video in object_list %} + {% if video.status == 2 %} + {% include 'festival/inc/video_card.html' %} + {% endif %} + {% endfor %} +
+{% endblock %} diff --git a/app/templates/magazine/article/article_detail.html b/app/templates/magazine/article/article_detail.html new file mode 100644 index 00000000..66ad853f --- /dev/null +++ b/app/templates/magazine/article/article_detail.html @@ -0,0 +1,147 @@ +{% extends "magazine/article/article_list.html" %} +{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n disqus_tags featured_tags %} + +{% block meta_title %}{{ article.meta_title }}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for article as tags %} +{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %} +{% endmetablock %}{% endblock %} + +{% block meta_description %}{% metablock %} +{{ article.description }} +{% endmetablock %}{% endblock %} + +{% block title %} +{% editable article.title %}{{ article.title }}{% endeditable %} +{% endblock %} + +{% block breadcrumb_menu %} +{{ block.super }} +
  • {{ article.title }}
  • +{% endblock %} + +{% block main %} +{% block blog_post_detail_postedby %} +{% editable article.publish_date %} + +{% endeditable %} +{% endblock %} +{% block blog_post_detail_commentlink %} +

    + {% if article.allow_comments %} + {% if settings.COMMENTS_DISQUS_SHORTNAME %} + ({% spaceless %} + {% trans "Comments" %} + {% endspaceless %}) + {% else %}({% spaceless %} + {% blocktrans count comments_count=article.comments_count %}{{ comments_count }} comment{% plural %}{{ comments_count }} comments{% endblocktrans %} + {% endspaceless %}) + {% endif %} + {% endif %} +

    +{% endblock %} + +{% comment %} +{% block blog_post_detail_featured_image %} +{% if settings.BLOG_USE_FEATURED_IMAGE and article.featured_image %} +

    +{% endif %} +{% endblock %} +{% endcomment %} + +{% if settings.COMMENTS_DISQUS_SHORTNAME %} +{% include "generic/includes/disqus_counts.html" %} +{% endif %} + +{% block blog_post_detail_content %} +{% editable article.content %} +{{ article.content|richtext_filters|safe }} +{% endeditable %} +{% endblock %} + +{% block blog_post_detail_keywords %} +{% keywords_for article as tags %} +{% if tags %} +{% spaceless %} +
      +
    • {% trans "Tags" %}:
    • + {% for tag in tags %} +
    • {{ tag }}{% if not forloop.last %}, {% endif %}
    • + {% endfor %} +
    +{% endspaceless %} +{% endif %} +{% endblock %} + +{% comment %} +{% block blog_post_detail_rating %} +
    +
    + {% rating_for article %} +
    +
    +{% endblock %} +{% endcomment %} + +{% block event_detail_sharebuttons %} + {% with article as object %} + {% include "includes/share_buttons.html" %} + {% endwith %} +{% endblock %} + +{% block blog_post_previous_next %} +
      +{% with article.get_previous_by_publish_date as previous %} +{% if previous %} + +{% endif %} +{% endwith %} +{% with article.get_next_by_publish_date as next %} +{% if next %} + +{% endif %} +{% endwith %} +
    +{% endblock %} + + +{% block blog_post_detail_related_posts %} +{% if related_posts or article.events.all %} + +{% endif %} +{% endblock %} + +{% block blog_post_detail_comments %} +{% if article.allow_comments %}{% comments_for article %}{% endif %} +{% endblock %} + +{% endblock %} diff --git a/app/templates/magazine/article/article_list.html b/app/templates/magazine/article/article_list.html new file mode 100644 index 00000000..c9db077f --- /dev/null +++ b/app/templates/magazine/article/article_list.html @@ -0,0 +1,106 @@ +{% extends "base.html" %} +{% load i18n mezzanine_tags blog_tags keyword_tags disqus_tags %} + +{% block meta_title %}{% if page %}{{ page.meta_title }}{% else %}{% trans "Articles" %}{% endif %}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for page as keywords %} +{% for keyword in keywords %} + {% if not forloop.first %}, {% endif %} + {{ keyword }} +{% endfor %} +{% endmetablock %}{% endblock %} + +{% block meta_description %}{% metablock %} +{{ page.description }} +{% endmetablock %}{% endblock %} + +{% block title %} +{% if page %} +{% editable page.title %}{{ page.title }}{% endeditable %} +{% else %} +{% trans "Articles" %} +{% endif %} +{% endblock %} + +{% block breadcrumb_menu %} +{{ block.super }} +{% if tag or category or year or month or author %} +
  • {% spaceless %} +{% if tag %} + {% trans "Tag:" %} {{ tag }} +{% else %}{% if category %} + {% trans "Category:" %} {{ category }} +{% else %}{% if year or month %} + {% if month %}{{ month }}, {% endif %}{{ year }} +{% else %}{% if author %} + {% trans "Author:" %} {{ author.get_full_name|default:author.username }} +{% endif %}{% endif %}{% endif %}{% endif %} +{% endspaceless %} +
  • +{% endif %} +{% endblock %} + +{% block main %} + +{% comment %} +{% if tag or category or year or month or author %} + {% block blog_post_list_filterinfo %} +

    + {% if tag %} + {% trans "Viewing posts tagged" %} {{ tag }} + {% else %}{% if category %} + {% trans "Viewing posts for the category" %} {{ category }} + {% else %}{% if year or month %} + {% trans "Viewing posts from" %} {% if month %}{{ month }}, {% endif %} + {{ year }} + {% else %}{% if author %} + {% trans "Viewing posts by" %} + {{ author.get_full_name|default:author.username }} + {% endif %}{% endif %}{% endif %}{% endif %} + {% endblock %} +

    +{% else %} +{% endcomment %} +{% if page %} +{% if page.get_content_model.content %} + {% editable page.get_content_model.content %} + {{ page.get_content_model.content|richtext_filters|safe }} + {% endeditable %} +{% endif %} +{% else %} + {% blog_categories as categories %} + {% if categories %} +
      + {% for cat in categories %} +
    • + {{ cat }} ({{ cat.post_count }}) +
    • + {% endfor %} +
    +
    + {% endif %} +{# {% endif %}#} + +{% endif %} + +
    +
    + + {% for article in article_list %} + {% with article as post %} + {# {% trans "Article" %}#} + {% include 'magazine/article/includes/post_card.html' %} + {% endwith %} + {% endfor %} +
    + +{% if settings.COMMENTS_DISQUS_SHORTNAME %} +{% include "generic/includes/disqus_counts.html" %} +{% endif %} + +{% endblock %} + +{% block right_panel %} +{% include "blog/includes/filter_panel.html" %} +{% endblock %} diff --git a/app/templates/magazine/article/includes/post_card.html b/app/templates/magazine/article/includes/post_card.html new file mode 100644 index 00000000..a9205756 --- /dev/null +++ b/app/templates/magazine/article/includes/post_card.html @@ -0,0 +1,19 @@ +{% load i18n pages_tags mezzanine_tags %} + +
    +
    + + {% if article.featured_image %} +
    + Article: {{ article.title }} +
    + {% endif %} +

    + + {{ article.title }} + +

    + {# {% trans "published on" %} {{ article.publish_date|date:"DATE_FORMAT" }}#} +
    +
    +
    diff --git a/app/templates/templates/festival/artist_detail.html b/app/templates/templates/festival/artist_detail.html deleted file mode 100644 index 95ca5cd9..00000000 --- a/app/templates/templates/festival/artist_detail.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load mezzanine_tags keyword_tags featured_tags %} - -{% block title %} -{{ artist.name }} -{% endblock %} - -{% block main %} -
    -

    - {% if artist.photo %} -

    - - -
    - {% endif %} - {{ artist.bio|safe }} -
    -

    -
    - -
    -{% if artist.events.all %} -

    {% trans "Also discover" %}


    -
    -
    - {% for event in artist.events.all|no_parents %} - {% include 'agenda/includes/event_card.html' %} - {% endfor %} - {% for video in artist.videos.all %} - {% include 'festival/inc/video_card.html' %} - {% endfor %} - {% with artist.events.all|unique_posts as posts %} - {% for post in posts %} - {% include 'blog/includes/post_card.html' %} - {% endfor %} - {% endwith %} -
    -{% endif %} -{% endblock %} diff --git a/app/templates/templates/festival/artist_list.html b/app/templates/templates/festival/artist_list.html deleted file mode 100644 index ba6e6a63..00000000 --- a/app/templates/templates/festival/artist_list.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load mezzanine_tags keyword_tags %} - -{% block title %} - {% trans "Artists" %} -{% endblock %} - -{% block main %} -
    -
    - {% for artist in object_list %} - {% include "festival/inc/artist_card.html" %} - {% endfor %} -
    -{% endblock %} diff --git a/app/templates/templates/festival/inc/artist_card.html b/app/templates/templates/festival/inc/artist_card.html deleted file mode 100644 index 21c3babe..00000000 --- a/app/templates/templates/festival/inc/artist_card.html +++ /dev/null @@ -1,16 +0,0 @@ -{% load i18n pages_tags mezzanine_tags %} - - diff --git a/app/templates/templates/festival/inc/audio_playlist.html b/app/templates/templates/festival/inc/audio_playlist.html deleted file mode 100644 index 83478730..00000000 --- a/app/templates/templates/festival/inc/audio_playlist.html +++ /dev/null @@ -1,26 +0,0 @@ -{% load staticfiles %} - -
    - {% for audio in playlist.audios.all %} - {% if forloop.first %} -
    - - - {{ audio.title }} - -
    - - {% endif %} -
    diff --git a/app/templates/templates/festival/inc/video_card.html b/app/templates/templates/festival/inc/video_card.html deleted file mode 100644 index 3d5bb2ed..00000000 --- a/app/templates/templates/festival/inc/video_card.html +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n %} - -
    -
    - -
    -
    -

    {{ video.title }}

    -
    - {% trans "Play the video" %} -
    diff --git a/app/templates/templates/festival/video_detail.html b/app/templates/templates/festival/video_detail.html deleted file mode 100644 index b954cc14..00000000 --- a/app/templates/templates/festival/video_detail.html +++ /dev/null @@ -1,52 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load mezzanine_tags keyword_tags %} - -{% block title %} -{{ video.title }} -{% endblock %} - -{% block main %} - -
    - {{ video.content|safe }} -
    - -
    - -
    - -{% with video as object %} - {% include "includes/share_buttons.html" %} -{% endwith %} - -{% if video.event %} -
    -

    {% trans 'Also discover' %}

    -
    -
    - {% with video.event as event %} - {% include 'agenda/includes/event_card.html' %} - {% for artist in video.artists.all %} - {% include "festival/inc/artist_card.html" %} - {% endfor %} - {% for v in event.videos.all %} - {% if v != video %} - {% with v as video %} - {% include 'festival/inc/video_card.html' %} - {% endwith %} - {% endif %} - {% endfor %} - {% for post in event.blog_posts.all %} - {% include 'blog/includes/post_card.html' %} - {% endfor %} - {% endwith %} - -
    -
    -{% endif %} - -{% endblock %} diff --git a/app/templates/templates/festival/video_list.html b/app/templates/templates/festival/video_list.html deleted file mode 100644 index f951aa2a..00000000 --- a/app/templates/templates/festival/video_list.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load mezzanine_tags keyword_tags featured_tags %} - -{% block title %} - {% trans "Videos" %} -{% endblock %} - -{% block main %} - -{% if categories %} -
      -{% for cat in categories %} -
    • - {{ cat }} ({{ cat.count }}) -
    • -{% endfor %} -
    -
    -{% endif %} - -
    -
    - {% for video in object_list %} - {% if video.status == 2 %} - {% include 'festival/inc/video_card.html' %} - {% endif %} - {% endfor %} -
    -{% endblock %} diff --git a/app/templates/templates/magazine/article/article_detail.html b/app/templates/templates/magazine/article/article_detail.html deleted file mode 100644 index 038899f9..00000000 --- a/app/templates/templates/magazine/article/article_detail.html +++ /dev/null @@ -1,148 +0,0 @@ -{% extends "blog/blog_post_list.html" %} -{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n disqus_tags featured_tags %} - -{% block meta_title %}{{ blog_post.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for blog_post as tags %} -{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ blog_post.description }} -{% endmetablock %}{% endblock %} - -{% block title %} -{% editable blog_post.title %}{{ blog_post.title }}{% endeditable %} -{% endblock %} - -{% block breadcrumb_menu %} -{{ block.super }} -
  • {{ blog_post.title }}
  • -{% endblock %} - -{% block main %} -coucou -{% block blog_post_detail_postedby %} -{% editable blog_post.publish_date %} - -{% endeditable %} -{% endblock %} -{% block blog_post_detail_commentlink %} -

    - {% if blog_post.allow_comments %} - {% if settings.COMMENTS_DISQUS_SHORTNAME %} - ({% spaceless %} - {% trans "Comments" %} - {% endspaceless %}) - {% else %}({% spaceless %} - {% blocktrans count comments_count=blog_post.comments_count %}{{ comments_count }} comment{% plural %}{{ comments_count }} comments{% endblocktrans %} - {% endspaceless %}) - {% endif %} - {% endif %} -

    -{% endblock %} - -{% comment %} -{% block blog_post_detail_featured_image %} -{% if settings.BLOG_USE_FEATURED_IMAGE and blog_post.featured_image %} -

    -{% endif %} -{% endblock %} -{% endcomment %} - -{% if settings.COMMENTS_DISQUS_SHORTNAME %} -{% include "generic/includes/disqus_counts.html" %} -{% endif %} - -{% block blog_post_detail_content %} -{% editable blog_post.content %} -{{ blog_post.content|richtext_filters|safe }} -{% endeditable %} -{% endblock %} - -{% block blog_post_detail_keywords %} -{% keywords_for blog_post as tags %} -{% if tags %} -{% spaceless %} -
      -
    • {% trans "Tags" %}:
    • - {% for tag in tags %} -
    • {{ tag }}{% if not forloop.last %}, {% endif %}
    • - {% endfor %} -
    -{% endspaceless %} -{% endif %} -{% endblock %} - -{% comment %} -{% block blog_post_detail_rating %} -
    -
    - {% rating_for blog_post %} -
    -
    -{% endblock %} -{% endcomment %} - -{% block event_detail_sharebuttons %} - {% with blog_post as object %} - {% include "includes/share_buttons.html" %} - {% endwith %} -{% endblock %} - -{% block blog_post_previous_next %} -
      -{% with blog_post.get_previous_by_publish_date as previous %} -{% if previous %} - -{% endif %} -{% endwith %} -{% with blog_post.get_next_by_publish_date as next %} -{% if next %} - -{% endif %} -{% endwith %} -
    -{% endblock %} - - -{% block blog_post_detail_related_posts %} -{% if related_posts or blog_post.events.all %} - -{% endif %} -{% endblock %} - -{% block blog_post_detail_comments %} -{% if blog_post.allow_comments %}{% comments_for blog_post %}{% endif %} -{% endblock %} - -{% endblock %}