settings: Extract settings.SHOW_OSS_ANNOUNCEMENT.

This commit is contained in:
Tim Abbott 2016-07-18 21:49:47 -07:00
parent ed285e22f1
commit c25b077224
7 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,7 @@
{% block hello_page_container %} hello-main{% endblock %}
{% block hello_page_footer %} hello-footer{% endblock %}
{% block os_announcement %}
{% if zulip_com %}
{% if show_oss_announcement %}
<div class="os-headline-container">
<img src="/static/images/logo/zballoon.png" class="os-illustration" alt="Zulip balloon" />
<div class="main-headline-text">

View File

@ -3,7 +3,7 @@
{# API information page #}
{% block os_announcement %}
{% if zulip_com %}
{% if show_oss_announcement %}
<div class="os-headline-container">
<img src="/static/images/logo/zballoon.png" class="os-illustration" alt="Zulip balloon" />
<div class="main-headline-text">

View File

@ -8,7 +8,7 @@
{% endblock %}
{% block os_announcement %}
{% if zulip_com %}
{% if show_oss_announcement %}
<div class="os-headline-container">
<img src="/static/images/logo/zballoon.png" class="os-illustration" alt="Zulip balloon" />
<div class="main-headline-text">

View File

@ -12,6 +12,7 @@ def add_settings(request):
# to the template
'not_voyager': not settings.VOYAGER,
'zulip_com': settings.ZULIP_COM,
'show_oss_announcement': settings.SHOW_OSS_ANNOUNCEMENT,
'zulip_admin': settings.ZULIP_ADMINISTRATOR,
'login_url': settings.HOME_NOT_LOGGED_IN,
'only_sso': settings.ONLY_SSO,

View File

@ -23,7 +23,7 @@ from six import text_type
SIGNUP_STRING = u'Your e-mail does not match any existing open organization. ' + \
u'Use a different e-mail address, or contact %s with questions.' % (settings.ZULIP_ADMINISTRATOR,)
if settings.ZULIP_COM:
if settings.SHOW_OSS_ANNOUNCEMENT:
SIGNUP_STRING = u'Your e-mail does not match any existing organization. <br />' + \
u"The zulip.com service is not taking new customer teams. <br /> " + \
u"<a href=\"https://blogs.dropbox.com/tech/2015/09/open-sourcing-zulip-a-dropbox-hack-week-project/\">" + \

View File

@ -29,6 +29,7 @@ if not ZULIP_COM:
ZULIP_FRIENDS_LIST_ID = '84b2f3da6b'
SHARE_THE_LOVE = True
SHOW_OSS_ANNOUNCEMENT = True
# This can be filled in automatically from the database, maybe
DEPLOYMENT_ROLE_NAME = 'zulip.com'

View File

@ -146,6 +146,7 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
'AUTH_LDAP_SERVER_URI': "",
'EXTERNAL_URI_SCHEME': "https://",
'ZULIP_COM': False,
'SHOW_OSS_ANNOUNCEMENT': False,
'STATSD_HOST': '',
'OPEN_REALM_CREATION': False,
'REMOTE_POSTGRES_HOST': '',