From 576c91a6a8f6ae2028e3cbddce787436249fc32c Mon Sep 17 00:00:00 2001 From: Evert Date: Sat, 11 Nov 2017 15:33:27 +0200 Subject: [PATCH] Show - Add Open Graph meta to episode and show page --- Show/templates/episode.html | 13 +++++++++++++ Show/templates/show.html | 9 +++++++++ Show/templates/submit.html | 2 +- Show/views.py | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Show/templates/episode.html b/Show/templates/episode.html index 9a28c22..1e53526 100644 --- a/Show/templates/episode.html +++ b/Show/templates/episode.html @@ -1,7 +1,18 @@ {% extends "base.html" %} + {% block title %} Episode "{{episode.name}}" - S{{episode.season.number}}E{{episode.episode}} - {{show.name}} - Episodes.Community {% endblock %} + +{% block meta %} + {{ block.super }} + + + + + +{% endblock %} + {% block content %}
@@ -21,6 +32,8 @@  Show Index {% if request.session.user_id %}  Submit New Link + {% else %} + Log in to submit a link {% endif %}

Watch {{episode.name}} From

diff --git a/Show/templates/show.html b/Show/templates/show.html index 8b66ddb..e8c46c6 100644 --- a/Show/templates/show.html +++ b/Show/templates/show.html @@ -2,6 +2,15 @@ {% block title %} Watch {{show.name}} Now - on Episodes.Community! {% endblock %} + +{% block meta %} + {{ block.super }} + + + + +{% endblock %} + {% block content %}
diff --git a/Show/templates/submit.html b/Show/templates/submit.html index d34a925..98d285c 100644 --- a/Show/templates/submit.html +++ b/Show/templates/submit.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% block title %} - Episode "{{episode.name}}" - S{{episode.season.number}}E{{episode.episode}} - {{show.name}} - Episodes.Community + Submit a link - S{{episode.season.number}}E{{episode.episode}} - {{show.name}} - Episodes.Community {% endblock %} {% block content %}
diff --git a/Show/views.py b/Show/views.py index 9e91303..f3740e9 100644 --- a/Show/views.py +++ b/Show/views.py @@ -63,7 +63,7 @@ class EpisodeView(TemplateView): if not episode: raise Http404("Episode does not exist") - # I aknowledge that this is a mess. A functional mess. But a mess nonetheless. Hey, that rhymed! + # I acknowledge that this is a mess. A functional mess. But a mess nonetheless. Hey, that rhymed! submissions = episode.submissions.annotate( positives=Count( Case(