Skip to content

Commit

Permalink
Remove duplicate ZULIP_COM detection from settings.py.
Browse files Browse the repository at this point in the history
And fix up some required configuration.

(imported from commit 761758638baa297118848c9f5640638d6b2f4f67)
  • Loading branch information
timabbott committed Aug 21, 2015
1 parent e78361f commit 6f50a27
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions zproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@
PRODUCTION = config_file.has_option('machine', 'deploy_type')
DEVELOPMENT = not PRODUCTION

# The following flags are left over from the various configurations of
# Zulip run by Zulip, Inc. We will eventually be able to get rid of
# them and just have the PRODUCTION flag, but we need them for now.
ZULIP_COM_STAGING = PRODUCTION and config_file.get('machine', 'deploy_type') == 'zulip.com-staging'
ZULIP_COM = ((PRODUCTION and config_file.get('machine', 'deploy_type') == 'zulip.com-prod')
or ZULIP_COM_STAGING)

# Voyager is a production zulip server that is not zulip.com or
# staging.zulip.com VOYAGER is the standalone all-on-one-server
# production deployment model for based on the original Zulip
# ENTERPRISE implementation. We expect most users of the open source
# project will be using VOYAGER=True in production.
VOYAGER = PRODUCTION and not ZULIP_COM

secrets_file = ConfigParser.RawConfigParser()
if PRODUCTION:
secrets_file.read("/etc/zulip/zulip-secrets.conf")
Expand Down Expand Up @@ -110,6 +96,13 @@ def get_secret(key):
NEW_USER_BOT = "[email protected]"
EMAIL_GATEWAY_BOT = "[email protected]"

# Voyager is a production zulip server that is not zulip.com or
# staging.zulip.com VOYAGER is the standalone all-on-one-server
# production deployment model for based on the original Zulip
# ENTERPRISE implementation. We expect most users of the open source
# project will be using VOYAGER=True in production.
VOYAGER = PRODUCTION and not ZULIP_COM

########################################################################
# STANDARD DJANGO SETTINGS
########################################################################
Expand Down Expand Up @@ -377,6 +370,8 @@ def get_secret(key):
'DEFAULT_AVATAR_URI': '/static/images/default-avatar.png',
'AUTH_LDAP_SERVER_URI': "",
'EXTERNAL_URI_SCHEME': "https://",
'ZULIP_COM': False,
'ZULIP_COM_STAGING': False,
'GOOGLE_CLIENT_ID': '',
'DBX_APNS_CERT_FILE': None,
}
Expand Down

0 comments on commit 6f50a27

Please sign in to comment.