Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jannik Hellenkamp
website
Commits
d82943b2
Commit
d82943b2
authored
Apr 05, 2017
by
Julian Rother
Browse files
Display hostname in moderator interface
parent
a6b1357e
Changes
2
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
d82943b2
...
...
@@ -10,6 +10,7 @@ import random
import
sched
import
traceback
import
string
from
socket
import
gethostname
app
=
Flask
(
__name__
)
...
...
@@ -18,6 +19,7 @@ app.jinja_env.lstrip_blocks = True
app
.
add_template_global
(
random
.
randint
,
name
=
'randint'
)
app
.
add_template_global
(
datetime
,
name
=
'datetime'
)
app
.
add_template_global
(
timedelta
,
name
=
'timedelta'
)
app
.
add_template_global
(
gethostname
,
name
=
'gethostname'
)
scheduler
=
sched
.
scheduler
()
def
run_scheduler
():
...
...
templates/base.html
View file @
d82943b2
...
...
@@ -145,6 +145,11 @@
<li>
<a
href=
"https://twitter.com/rwthvideo"
>
Twitter
</a>
</li>
{% if ismod() %}
<li
class=
"pull-right"
>
{{ gethostname() }}
</li>
{% endif %}
</div>
</footer>
{% endblock %}
...
...
Write
Preview
Supports
Markdown
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