Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f5c1f9cd
authored
Mar 18, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: get company name from settings file
parent
80e000c4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletions
+13
-1
circle/circle/settings/base.py
+3
-0
circle/dashboard/context_processors.py
+9
-0
circle/dashboard/templates/dashboard/base.html
+1
-1
No files found.
circle/circle/settings/base.py
View file @
f5c1f9cd
...
...
@@ -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"
circle/dashboard/context_processors.py
View file @
f5c1f9cd
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
),
}
circle/dashboard/templates/dashboard/base.html
View file @
f5c1f9cd
...
...
@@ -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"
>
©
BME IK 2014
</span>
<span
class=
"pull-right"
>
©
{{ COMPANY_NAME }}
</span>
</footer>
</body>
{% block extra_js %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment