Skip to content
Snippets Groups Projects
Verified Commit 5a5e81b9 authored by nd's avatar nd
Browse files

removed version from footer as well as drop the git dependency

parent eb2c2c2e
Branches
Tags
No related merge requests found
......@@ -15,7 +15,6 @@ Development chat: [#uffd-development](https://rocket.events.ccc.de/channel/uffd-
- python3-fido2 (version 0.5.0, optional)
- python3-flask-oauthlib
- python3-flask-babel
- git (cli utility, musst be in path)
Some of the dependencies (especially fido2 and flask-oauthlib) changed their API in recent versions, so make sure to install the versions from Debian Buster.
You can also use virtualenv with the supplied `requirements.txt`.
......
import random
import subprocess
import base64
from datetime import timedelta, datetime
import io
......@@ -28,11 +27,6 @@ def register_template_helper(app):
def datauri(data, mimetype='text/plain'): #pylint: disable=unused-variable
return Markup('data:%s;base64,%s'%(mimetype, base64.b64encode(data.encode()).decode()))
@app.url_defaults
def static_version_inject(endpoint, values): #pylint: disable=unused-variable
if endpoint == 'static':
values['v'] = app.jinja_env.globals['gitversion']['longhash'] #pylint: disable=no-member
app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
......@@ -42,7 +36,3 @@ def register_template_helper(app):
app.add_template_global(min, name='min')
app.add_template_global(max, name='max')
app.add_template_global(equalto, name='equalto')
# get git commit
git_output = subprocess.check_output(['git', "log", "-g", "-1", "--pretty=%H#%h#%d#%s"]).decode('UTF-8').split('#', 3)
app.jinja_env.globals['gitversion'] = {'hash': git_output[1], 'longhash': git_output[0], 'branch': git_output[2], 'msg': git_output[3]} #pylint: disable=no-member
......@@ -130,8 +130,7 @@
<li class="list-inline-item"><a href="{{ link.url }}">{{ link.title }}</a></li>
{% endfor %}
<li class="list-inline-item float-right">
<a href="https://git.cccv.de/uffd/uffd/">{{_("Sourcecode")}}</a>
<a target="_blank" href="https://git.cccv.de/uffd/uffd/-/commit/{{ gitversion.longhash }}"><span title="{{ gitversion.branch }} {{ gitversion.hash }}: {{ gitversion.msg }}" data-toggle="tooltip">Version: {{ gitversion.hash }}</span></a>
<a href="https://git.cccv.de/uffd/uffd/">{{_("About uffd")}}</a>
</li>
</ul>
</div>
......
No preview for this file type
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-07-30 19:49+0200\n"
"POT-Creation-Date: 2021-07-30 21:03+0200\n"
"PO-Revision-Date: 2021-05-25 21:18+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
......@@ -962,8 +962,8 @@ msgstr "Verlassen von Rollen ist deaktiviert"
#: uffd/selfservice/views.py:147
#, python-format
msgid "You left role \"%(role_name)s\""
msgstr "Rolle \"%(role_name)s\" verlassen"
msgid "You left role %(role_name)s"
msgstr "Rolle %(role_name)s verlassen"
#: uffd/selfservice/views.py:211
#, python-format
......@@ -1408,8 +1408,8 @@ msgid "Change"
msgstr "Ändern"
#: uffd/templates/base.html:133
msgid "Sourcecode"
msgstr "Quellcode"
msgid "About uffd"
msgstr "Über uffd"
#: uffd/user/views_group.py:21
msgid "Groups"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment