Skip to content

Commit 6cef213

Browse files
committed
Refine the version from git implementation #88
Signed-off-by: tdruez <tdruez@nexb.com>
1 parent 97e3d7a commit 6cef213

5 files changed

Lines changed: 7 additions & 5 deletions

File tree

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Save the version details for git tarballs in .VERSION file
2+
.VERSION export-subst

dje/context_processors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
def dejacode_context(request):
1515
"""Return all the DejaCode specific context variables."""
1616
return {
17-
"DEJACODE_VERSION": DEJACODE_VERSION,
17+
"DEJACODE_VERSION": DEJACODE_VERSION.lstrip("v"),
1818
"DEJACODE_SUPPORT_EMAIL": settings.DEJACODE_SUPPORT_EMAIL,
1919
"FAVICON_HREF": settings.FAVICON_HREF,
2020
"SITE_TITLE": settings.SITE_TITLE,

dje/templates/admin/base_site.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
{% load i18n grp_tags static %}
33

44
{% block title %}
5-
{{ SITE_TITLE }} {{ DEJACODE_VERSION }} Administration
5+
{{ SITE_TITLE }} Administration v{{ DEJACODE_VERSION }}
66
{% endblock %}
77

88
{% block admin_title %}
99
<h1 id="grp-admin-title">
10-
{{ SITE_TITLE }} {{ DEJACODE_VERSION }} Administration
10+
{{ SITE_TITLE }} Administration v{{ DEJACODE_VERSION }}
1111
</h1>
1212
{% endblock %}
1313

dje/templates/includes/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<a class="dropdown-item" href="https://github.com/nexB/dejacode/releases" target="_blank" rel="noreferrer">{% trans 'Releases' %}</a>
1818
<a class="dropdown-item" href="https://scancode-licensedb.aboutcode.org/agpl-3.0.html" target="_blank" rel="noreferrer">{% trans 'License' %}</a>
1919
<div class="dropdown-divider"></div>
20-
<h6 class="dropdown-header">{{ DEJACODE_VERSION }}</h6>
20+
<h6 class="dropdown-header">v{{ DEJACODE_VERSION }}</h6>
2121
</div>
2222
</div>
2323
{% endblock %}

dje/templates/includes/navbar_header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
</a>
127127
{% endif %}
128128
<div class="dropdown-divider"></div>
129-
<div class="dropdown-header">{{ DEJACODE_VERSION }}</div>
129+
<div class="dropdown-header">v{{ DEJACODE_VERSION }}</div>
130130
<div class="dropdown-divider"></div>
131131
<form id="logout-form" method="post" action="{% url 'logout' %}">
132132
{% csrf_token %}

0 commit comments

Comments
 (0)