Compare commits

...

2 commits

Author SHA1 Message Date
69807d034e
slight title update for dashboard
All checks were successful
Build and Deploy Staging / build (push) Successful in 47s
Tests / test (push) Successful in 31s
Build and Deploy Staging / deploy (push) Successful in 7s
2025-10-03 15:36:18 +02:00
5cd80b7270
display version or env in footer 2025-10-03 15:34:12 +02:00
3 changed files with 17 additions and 1 deletions

View file

@ -65,6 +65,8 @@
<div class="float-end">
<p>
Crafted with <span class="text-danger"><i class="bi bi-heart-fill icon-mid"></i></span> in Zurich
{% load version_tags %}
- {% get_version_or_env %}
</p>
</div>
</div>

View file

@ -1,7 +1,7 @@
{% extends "frontend/base.html" %}
{% load i18n static %}
{% block html_title %}
{{ object.name }} {% translate "Dashboard" %}
{% translate "Dashboard" %} for {{ object.name }}
{% endblock html_title %}
{% block page_title %}{% endblock %}
{% block content %}

View file

@ -0,0 +1,14 @@
import os
from django import template
from servala.__about__ import __version__
register = template.Library()
@register.simple_tag
def get_version_or_env():
"""Return version number in production, environment name otherwise."""
env = os.environ.get('SERVALA_ENVIRONMENT', 'development')
if env == 'production':
return __version__
return env