Added Disqus commenting

master
androiddrew 6 years ago
parent bfcdb4b702
commit 1f8c422b9c

@ -6,7 +6,7 @@
{% block content %} {% block content %}
{% include 'header.html' %} {% include 'header.html' %}
<article class="ph3 ph3-ns center mw8"> <article class="ph3 ph3-ns center mw8 lh-copy">
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
<p class="meta">{{ page.date }}</p> <p class="meta">{{ page.date }}</p>
{% if page.tags.all.count %} {% if page.tags.all.count %}
@ -18,13 +18,25 @@
{% endif %} {% endif %}
{{ page.body|richtext }} {{ page.body|richtext }}
{{ page.full_url }}
{% for item in page.gallery_images.all %}
<div class="fl ma1">
{% image item.image fill-320x240 %}
<p> {{ item.caption }}</p>
</div>
{% endfor %}
</article> </article>
<div id="disqus_thread" class="mw8 center"></div>
<script>
{% if not debug %}
var disqus_config = function () {
this.page.url = {{ page.full_url }};
this.page.identifier = {{ page.slug }};
};
{% endif %}
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://datasketch-io.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{% endblock %} {% endblock %}

@ -16,7 +16,6 @@ import os
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_DIR = os.path.dirname(PROJECT_DIR) BASE_DIR = os.path.dirname(PROJECT_DIR)
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
@ -80,7 +79,6 @@ TEMPLATES = [
WSGI_APPLICATION = "cms.wsgi.application" WSGI_APPLICATION = "cms.wsgi.application"
# Database # Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases # https://docs.djangoproject.com/en/2.1/ref/settings/#databases
@ -104,7 +102,6 @@ AUTH_PASSWORD_VALIDATORS = [
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"}, {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
] ]
# Internationalization # Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/ # https://docs.djangoproject.com/en/2.1/topics/i18n/
@ -118,7 +115,6 @@ USE_L10N = True
USE_TZ = True USE_TZ = True
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/ # https://docs.djangoproject.com/en/2.1/howto/static-files/
@ -140,7 +136,6 @@ STATIC_URL = "/static/"
MEDIA_ROOT = os.path.join(BASE_DIR, "media") MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = "/media/" MEDIA_URL = "/media/"
# Wagtail settings # Wagtail settings
WAGTAIL_SITE_NAME = "datasketch.io" WAGTAIL_SITE_NAME = "datasketch.io"
@ -148,3 +143,7 @@ WAGTAIL_SITE_NAME = "datasketch.io"
# Base URL to use when referring to full URLs within the Wagtail admin backend - # Base URL to use when referring to full URLs within the Wagtail admin backend -
# e.g. in notification emails. Don't include '/admin' or a trailing slash # e.g. in notification emails. Don't include '/admin' or a trailing slash
BASE_URL = "https://datasketch.io" BASE_URL = "https://datasketch.io"
INTERNAL_IPS = [
'127.0.0.1',
]

Loading…
Cancel
Save