2013-04-23 18:51:17 +02:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2012-10-15 22:52:08 +02:00
|
|
|
from django.conf import settings
|
2013-06-18 23:55:55 +02:00
|
|
|
import ujson
|
2013-11-04 23:42:31 +01:00
|
|
|
from zproject.backends import password_auth_enabled
|
2012-10-15 22:52:08 +02:00
|
|
|
|
2012-10-30 21:20:52 +01:00
|
|
|
def add_settings(request):
|
2012-10-17 20:34:38 +02:00
|
|
|
return {
|
|
|
|
'full_navbar': settings.FULL_NAVBAR,
|
2013-11-12 18:14:02 +01:00
|
|
|
'enterprise': settings.ENTERPRISE,
|
2013-11-04 19:37:05 +01:00
|
|
|
'zulip_admin': settings.ZULIP_ADMINISTRATOR,
|
2013-11-04 23:42:31 +01:00
|
|
|
'password_auth_enabled': password_auth_enabled(),
|
2012-10-17 20:34:38 +02:00
|
|
|
}
|
2013-06-17 18:01:22 +02:00
|
|
|
|
|
|
|
def add_metrics(request):
|
|
|
|
return {
|
|
|
|
'mixpanel_token': settings.MIXPANEL_TOKEN,
|
2013-06-18 23:55:55 +02:00
|
|
|
'enable_metrics': ujson.dumps(settings.DEPLOYED),
|
2013-10-29 22:21:17 +01:00
|
|
|
'dropboxAppKey': settings.DROPBOX_APP_KEY
|
2013-06-17 18:01:22 +02:00
|
|
|
}
|