Commit f5c1f9cd by Kálmán Viktor

dashboard: get company name from settings file

parent 80e000c4
......@@ -172,6 +172,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
'dashboard.context_processors.notifications',
'dashboard.context_processors.extract_settings',
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
......@@ -394,3 +395,5 @@ if get_env_variable('DJANGO_SAML', 'FALSE') == 'TRUE':
'DJANGO_SAML_ORG_ID_ATTRIBUTE')
LOGIN_REDIRECT_URL = "/"
COMPANY_NAME = "BME VIK 2014"
from django.conf import settings
def notifications(request):
count = (request.user.notification_set.filter(status="new").count()
if request.user.is_authenticated() else None)
return {
'NEW_NOTIFICATIONS_COUNT': count
}
def extract_settings(request):
return {
'COMPANY_NAME': getattr(settings, "COMPANY_NAME", None),
}
......@@ -75,7 +75,7 @@
<footer>
<a href="#">{% trans "Legal notice" %}</a> | <a href="#">{% trans "Policy" %}</a> | <a href="#">{% trans "Help" %}</a> |
<a href="#">{% trans "Support" %}</a>
<span class="pull-right">&copy; BME IK 2014</span>
<span class="pull-right">&copy; {{ COMPANY_NAME }}</span>
</footer>
</body>
{% block extra_js %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment