diff --git a/fet2020/core/templatetags/__init__.py b/fet2020/core/templatetags/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/fet2020/core/templatetags/version.py b/fet2020/core/templatetags/version.py new file mode 100644 index 00000000..24d3c39a --- /dev/null +++ b/fet2020/core/templatetags/version.py @@ -0,0 +1,10 @@ +from django import template + +from fet2020 import __version__, build + +register = template.Library() + + +@register.simple_tag +def version(): + return f"Version {__version__} Build {build}" diff --git a/fet2020/fet2020/__init__.py b/fet2020/fet2020/__init__.py index e69de29b..c03a2916 100644 --- a/fet2020/fet2020/__init__.py +++ b/fet2020/fet2020/__init__.py @@ -0,0 +1,7 @@ +from django.utils.version import get_version + +VERSION = (1, 0, 0, "final", 0) +BUILD = 0 + +__version__ = get_version(VERSION) +build = BUILD diff --git a/fet2020/templates/base.html b/fet2020/templates/base.html index 36425d2b..7c97192c 100644 --- a/fet2020/templates/base.html +++ b/fet2020/templates/base.html @@ -1,5 +1,6 @@ {% load flatpages %} {% load static %} +{% load version %} @@ -211,7 +212,7 @@ {% endif %}
© {% now 'Y' %} FET - Alle Rechte vorbehalten.
+© {% now 'Y' %} FET - Alle Rechte vorbehalten. {% version %}.