Files
zulip/zephyr/context_processors.py
Zev Benjamin 80702ccaa0 Add metrics variables to the template context via a context processor
Wrapping render_to_response never actually worked correctly.  On the
login page, mixpanel_token would be missing, but we wouldn't get an
error because it is surrounded by double quotes, which meant that it
was still valid Javascript.

(imported from commit 820ee42fab8f679983e5a3a4309a2feaf690f20f)
2013-06-18 17:07:36 -04:00

15 lines
282 B
Python

from __future__ import absolute_import
from django.conf import settings
import simplejson
def add_settings(request):
return {
'full_navbar': settings.FULL_NAVBAR,
}
def add_metrics(request):
return {
'mixpanel_token': settings.MIXPANEL_TOKEN,
}