Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
87eba101
Commit
87eba101
authored
Apr 07, 2017
by
Andreas Valder
Browse files
added commit hash and debug highlight
parent
d82943b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
87eba101
...
...
@@ -54,6 +54,10 @@ if sys.argv[0].endswith('run.py'):
config
.
from_pyfile
(
'config.py'
,
silent
=
True
)
if
config
[
'DEBUG'
]:
app
.
jinja_env
.
auto_reload
=
True
# get git commit
import
subprocess
app
.
jinja_env
.
globals
[
'gitversion'
]
=
subprocess
.
check_output
([
'git'
,
"log"
,
"-g"
,
"-1"
,
"--pretty=%h # %d # %s"
]).
decode
(
'UTF-8'
).
split
(
'#'
)
if
not
config
.
get
(
'SECRET_KEY'
,
None
):
config
[
'SECRET_KEY'
]
=
os
.
urandom
(
24
)
...
...
templates/base.html
View file @
87eba101
...
...
@@ -38,7 +38,7 @@
</head>
<body>
{% block navbar %}
<nav
class=
"hidden-print navbar navbar-default navbar-static-top"
>
<nav
class=
"hidden-print navbar navbar-default navbar-static-top"
{%
if
config.DEBUG
%}
style=
"background-color: red"
{%
endif
%}
>
<div
class=
"container-fluid"
>
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
...
...
@@ -127,7 +127,7 @@
</div>
</div>
{% block footer %}
<footer
class=
"footer hidden-print"
>
<footer
class=
"footer hidden-print"
{%
if
config.DEBUG
%}
style=
"background-color: red"
{%
endif
%}
>
<div
class=
"container-fluid"
>
<ul
class=
"list-inline"
style=
"margin-top: 5px;"
>
<li>
...
...
@@ -145,9 +145,10 @@
<li>
<a
href=
"https://twitter.com/rwthvideo"
>
Twitter
</a>
</li>
{% if ismod() %}
{% if ismod()
or config.DEBUG
%}
<li
class=
"pull-right"
>
{{ gethostname() }}
<a
target=
"_blank"
href=
"https://git.fsmpi.rwth-aachen.de/videoagwebsite/videoagwebsite/commit/{{ gitversion[0] }}"
><span
title=
"{{ gitversion[0] }} {{ gitversion[1] }}: {{ gitversion[2] }}"
data-toggle=
"tooltip"
>
{{ gitversion[0] }}
</span></a>
<span>
{{ gethostname() }}
</span>
</li>
{% endif %}
</div>
...
...
@@ -159,8 +160,12 @@
$
(
function
()
{
moderator
.
permissioneditor
.
setpermissions
({{
global_permissions
|
tojson
|
safe
}});
moderator
.
api
.
setcsrftoken
(
'
{{ session[
'
_csrf_token
'
] }}
'
);
$
(
'
[data-toggle="tooltip"]
'
).
tooltip
({
'
trigger
'
:
'
hover
'
});
});
</script>
{% endif %}
<script>
$
(
function
()
{
$
(
'
[data-toggle="tooltip"]
'
).
tooltip
({
'
trigger
'
:
'
hover
'
});
});
</script>
</html>
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