Rename enterprise template variable to not_enterprise.

The problem here is that some error-related templates render without
the context managers that we specify, and so we want the handling of
"the context was not set" to default to the enterprise case (because
the enterprise version will work basically fine on !enterprise, but
the opposite is not true because the enterprise distribution doesn't
even have the templates for certain !enterprise pages that may be
linked to).

(imported from commit 7547311d87e048d33221587f44b82fe0ba320ca1)
This commit is contained in:
Tim Abbott
2013-11-13 16:08:58 -05:00
parent 98b59f551a
commit e64472cd32
4 changed files with 18 additions and 15 deletions

View File

@@ -7,7 +7,10 @@ from zproject.backends import password_auth_enabled
def add_settings(request):
return {
'full_navbar': settings.FULL_NAVBAR,
'enterprise': settings.ENTERPRISE,
# We use the not_enterprise variable name so that templates
# will render even if the appropriate context is not provided
# to the template
'not_enterprise': not settings.ENTERPRISE,
'zulip_admin': settings.ZULIP_ADMINISTRATOR,
'password_auth_enabled': password_auth_enabled(),
'login_url': settings.HOME_NOT_LOGGED_IN,