diff --git a/src/blogengine/context_processors.py b/src/blogengine/context_processors.py new file mode 100644 index 0000000..d09e31a --- /dev/null +++ b/src/blogengine/context_processors.py @@ -0,0 +1,4 @@ +from django.conf import settings + +def disqus(context): + return {'DISQUS': settings.DISQUS} \ No newline at end of file diff --git a/src/ionescu77Project/settings/base.py b/src/ionescu77Project/settings/base.py index 01584e4..b4f1b06 100644 --- a/src/ionescu77Project/settings/base.py +++ b/src/ionescu77Project/settings/base.py @@ -25,6 +25,9 @@ ALLOWED_HOSTS = [] +# Need this for to disable Disqus in Dev and Staging +# see DISQUS=True/False + # Application definition @@ -61,6 +64,8 @@ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'blogengine.context_processors.disqus', # for passing DISQUS variable + ], }, },