mirror of
https://github.com/zulip/zulip.git
synced 2025-10-31 20:13:46 +00:00
Stop using local_settings.py at all in the Dev VM.
(imported from commit d067bcfe9d71628d8f671c5bc7bb38f521f9a965)
This commit is contained in:
@@ -36,11 +36,6 @@ NOREPLY_EMAIL_ADDRESS = "noreply@zulip.com"
|
||||
|
||||
SESSION_SERIALIZER = "django.contrib.sessions.serializers.PickleSerializer"
|
||||
|
||||
if DEPLOYED:
|
||||
EXTERNAL_URI_SCHEME = "https://"
|
||||
else:
|
||||
EXTERNAL_URI_SCHEME = "http://"
|
||||
|
||||
if TESTING_DEPLOYED:
|
||||
EXTERNAL_HOST = platform.node()
|
||||
elif STAGING_DEPLOYED:
|
||||
@@ -48,8 +43,7 @@ elif STAGING_DEPLOYED:
|
||||
elif DEPLOYED:
|
||||
EXTERNAL_HOST = 'zulip.com'
|
||||
EXTERNAL_API_PATH = 'api.zulip.com'
|
||||
else:
|
||||
EXTERNAL_HOST = 'localhost:9991'
|
||||
|
||||
|
||||
# For now, ENTERPRISE is only testing, so write to our test buckets
|
||||
if DEPLOYED and not ENTERPRISE:
|
||||
@@ -89,8 +83,6 @@ if STAGING_DEPLOYED:
|
||||
EMAIL_GATEWAY_PATTERN = "%s@streams.staging.zulip.com"
|
||||
elif DEPLOYED:
|
||||
EMAIL_GATEWAY_PATTERN = "%s@streams.zulip.com"
|
||||
else:
|
||||
EMAIL_GATEWAY_PATTERN = "%s@" + EXTERNAL_HOST
|
||||
|
||||
# Email mirror configuration
|
||||
# The email of the Zulip bot that the email gateway should post as.
|
||||
@@ -99,14 +91,8 @@ EMAIL_GATEWAY_BOT = "emailgateway@zulip.com"
|
||||
|
||||
SSO_APPEND_DOMAIN = None
|
||||
|
||||
if DEPLOYED:
|
||||
AUTHENTICATION_BACKENDS = ('zproject.backends.EmailAuthBackend',
|
||||
'zproject.backends.GoogleMobileOauth2Backend')
|
||||
else:
|
||||
## WARNING: ENABLING DevAuthBackend WILL ENABLE
|
||||
## ANYONE TO LOG IN AS ANY USER.
|
||||
AUTHENTICATION_BACKENDS = ('zproject.backends.DevAuthBackend',)
|
||||
|
||||
AUTHENTICATION_BACKENDS = ('zproject.backends.EmailAuthBackend',
|
||||
'zproject.backends.GoogleMobileOauth2Backend')
|
||||
|
||||
|
||||
JWT_AUTH_KEYS = {}
|
||||
|
||||
@@ -42,10 +42,6 @@ def get_secret(key):
|
||||
return secrets_file.get('secrets', key)
|
||||
return None
|
||||
|
||||
# Import variables like secrets from the local_settings file
|
||||
# Import local_settings after determining the deployment/machine type
|
||||
from local_settings import *
|
||||
|
||||
# Make this unique, and don't share it with anybody.
|
||||
SECRET_KEY = get_secret("secret_key")
|
||||
|
||||
@@ -82,6 +78,28 @@ TEST_SUITE = False
|
||||
# The new user tutorial is enabled by default, but disabled for client tests.
|
||||
TUTORIAL_ENABLED = True
|
||||
|
||||
# Import variables like secrets from the local_settings file
|
||||
# Import local_settings after determining the deployment/machine type
|
||||
if DEPLOYED:
|
||||
from local_settings import *
|
||||
else:
|
||||
# For the Dev VM environment, we use the same settings as the
|
||||
# sample local_settings.py file, with a few exceptions.
|
||||
from local_settings_template import *
|
||||
EXTERNAL_HOST = 'localhost:9991'
|
||||
AUTHENTICATION_BACKENDS = ('zproject.backends.DevAuthBackend',)
|
||||
# Add some of the below if you're testing other backends
|
||||
# AUTHENTICATION_BACKENDS = ('zproject.backends.EmailAuthBackend',
|
||||
# 'zproject.backends.GoogleMobileOauth2Backend',
|
||||
# 'zproject.backends.GoogleBackend')
|
||||
EXTERNAL_URI_SCHEME = "http://"
|
||||
EMAIL_GATEWAY_PATTERN = "%s@" + EXTERNAL_HOST
|
||||
ADMIN_DOMAIN = "zulip.com"
|
||||
NOTIFICATION_BOT = "notification-bot@zulip.com"
|
||||
ERROR_BOT = "error-bot@zulip.com"
|
||||
NEW_USER_BOT = "new-user-bot@zulip.com"
|
||||
EMAIL_GATEWAY_BOT = "emailgateway@zulip.com"
|
||||
|
||||
########################################################################
|
||||
# STANDARD DJANGO SETTINGS
|
||||
########################################################################
|
||||
|
||||
@@ -53,4 +53,5 @@ CACHES['database'] = {
|
||||
LOGGING['loggers']['zulip.requests']['level'] = 'CRITICAL'
|
||||
LOGGING['loggers']['zulip.management']['level'] = 'CRITICAL'
|
||||
|
||||
CAMO_URI = 'https://external-content.zulipcdn.net/'
|
||||
CAMO_KEY = 'dummy'
|
||||
|
||||
Reference in New Issue
Block a user