Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

Commit

Permalink
Added context processor for DISQUS variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionescu77 committed Jun 24, 2016
1 parent d026e98 commit 7a0b18a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/blogengine/context_processors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.conf import settings

def disqus(context):
return {'DISQUS': settings.DISQUS}
5 changes: 5 additions & 0 deletions src/ionescu77Project/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

ALLOWED_HOSTS = []

# Need this for to disable Disqus in Dev and Staging
# see DISQUS=True/False


# Application definition

Expand Down Expand Up @@ -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

],
},
},
Expand Down

0 comments on commit 7a0b18a

Please sign in to comment.