Remove the hardcoded " - WCF" from the title.
Export server_mode into the template context, and use it to conditionalize the addition of the server mode into the title. - Legacy-Id: 632
This commit is contained in:
parent
705957c988
commit
5a4e9de2f1
5
ietf/context_processors.py
Normal file
5
ietf/context_processors.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
def server_mode(request):
|
||||||
|
return {'server_mode': settings.SERVER_MODE}
|
||||||
|
|
|
@ -100,6 +100,13 @@ TEMPLATE_DIRS = (
|
||||||
BASE_DIR + "/templates"
|
BASE_DIR + "/templates"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||||
|
'django.core.context_processors.auth',
|
||||||
|
'django.core.context_processors.debug',
|
||||||
|
'django.core.context_processors.i18n',
|
||||||
|
'ietf.context_processors.server_mode',
|
||||||
|
)
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
|
|
|
@ -4,8 +4,12 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
|
||||||
<head><title>{% block title %}IETF Data{% endblock %} - WCF</title>
|
<head><title>{% block title %}IETF Data{% endblock %}{% ifnotequal server_mode "production" %} - {{ server_mode|upper }} MODE{% endifnotequal %}</title>
|
||||||
<link rel="icon" href="http://tools.ietf.org/images/django-ietf.png" />
|
{% ifnotequal server_mode "production" %}
|
||||||
|
<link rel="icon" href="/images/ietf-dev-icon.bmp" />
|
||||||
|
{% else %}
|
||||||
|
<link rel="icon" href="/images/ietf-icon.bmp" />
|
||||||
|
{% endifnotequal %}
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
<style type="text/css"><!--
|
<style type="text/css"><!--
|
||||||
{% block css %}{% endblock %}
|
{% block css %}{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue