Skip to content

Commit 3a04e91

Browse files
pitpalmechristophmeissner
authored andcommitted
Add version information as HTML comment
1 parent 4ad8567 commit 3a04e91

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

common/templatetags/site.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# coding: utf-8
22

33
# coding: utf-8
4-
5-
from django import template
4+
from django import conf, template
65

76
from django.contrib.sites.shortcuts import get_current_site
87

@@ -12,3 +11,8 @@
1211
@register.simple_tag
1312
def request_site(request):
1413
return get_current_site(request_site)
14+
15+
16+
@register.simple_tag
17+
def get_version():
18+
return conf.settings.VERSION

non_logged_in_area/templates/base_non_logged_in.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load humanize i18n static %}
1+
{% load humanize i18n static site %}
22
<!DOCTYPE html>
33
<html>
44
<head>
@@ -128,3 +128,4 @@
128128
</body>
129129

130130
</html>
131+
<!-- Version: {% get_version %} -->

templates/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@
5858
{% endblock %}
5959
</body>
6060
</html>
61+
<!-- Version: {% get_version %} -->

0 commit comments

Comments
 (0)