From 6678c4cdbb0962e2f8d95930032558a409cbe117 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Fri, 27 Oct 2017 20:32:50 +1100 Subject: [PATCH] Install WebSub plugin - it can't actually push anything yet because there's no micropub, and therefore no pinging, but it's a start --- Pipfile | 1 + Pipfile.lock | 9 ++++++++- lemoncurry/settings/base.py | 4 ++++ lemoncurry/templates/lemoncurry/layout.html | 3 +++ lemoncurry/templatetags/lemoncurry_tags.py | 5 +++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 29076bb..64d2ca9 100644 --- a/Pipfile +++ b/Pipfile @@ -26,6 +26,7 @@ markdown = "*" bleach = "*" django-debug-toolbar = "*" xrd = "*" +django-push = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index a4a8456..52e2a88 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "dc39eb988fd0df9d07f81c689d5ee326958f557b423bd98e6d52d0610e5691f5" + "sha256": "bf80c6036fc124e9afa1aa029b73d614b477dba02cf948696dd8eb1fa50dc745" }, "host-environment-markers": { "implementation_name": "cpython", @@ -137,6 +137,13 @@ ], "version": "==0.3.0" }, + "django-push": { + "hashes": [ + "sha256:88d9d57326c9b5f8485510527c780418da1a3c0c485dbb283281d6bf2ef6598d", + "sha256:7101f2d66ff7fd932fe379c70f4d03f74955634fbecb187f03c3e82cd55b8274" + ], + "version": "==1.0" + }, "django-redis-cache": { "hashes": [ "sha256:2b4e3510bbcaf3d331975717afd6f15a36fbaf7622504599d2727dc99f90c64d" diff --git a/lemoncurry/settings/base.py b/lemoncurry/settings/base.py index 5487fc9..891c646 100644 --- a/lemoncurry/settings/base.py +++ b/lemoncurry/settings/base.py @@ -216,3 +216,7 @@ META_SITE_PROTOCOL = 'https' META_SITE_NAME = LEMONCURRY_SITE_NAME META_USE_OG_PROPERTIES = True META_USE_TWITTER_PROPERTIES = True + +# django-push +# https://django-push.readthedocs.io/en/latest/publisher.html +PUSH_HUB = 'https://00dani.superfeedr.com/' diff --git a/lemoncurry/templates/lemoncurry/layout.html b/lemoncurry/templates/lemoncurry/layout.html index 523ecbb..01c88c4 100644 --- a/lemoncurry/templates/lemoncurry/layout.html +++ b/lemoncurry/templates/lemoncurry/layout.html @@ -7,6 +7,9 @@ + + + {% include 'meta/meta.html' %} diff --git a/lemoncurry/templatetags/lemoncurry_tags.py b/lemoncurry/templatetags/lemoncurry_tags.py index 4dcc899..df1aae5 100644 --- a/lemoncurry/templatetags/lemoncurry_tags.py +++ b/lemoncurry/templatetags/lemoncurry_tags.py @@ -97,3 +97,8 @@ def nav_crumbs(context, route): 'current': current, 'title': context.get('title'), } + + +@register.simple_tag +def get_push_hub(): + return settings.PUSH_HUB