Skip to content

Commit

Permalink
Refine the version from git implementation #88
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <tdruez@nexb.com>
  • Loading branch information
tdruez committed May 2, 2024
1 parent 97e3d7a commit 6cef213
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Save the version details for git tarballs in .VERSION file
.VERSION export-subst
2 changes: 1 addition & 1 deletion dje/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def dejacode_context(request):
"""Return all the DejaCode specific context variables."""
return {
"DEJACODE_VERSION": DEJACODE_VERSION,
"DEJACODE_VERSION": DEJACODE_VERSION.lstrip("v"),
"DEJACODE_SUPPORT_EMAIL": settings.DEJACODE_SUPPORT_EMAIL,
"FAVICON_HREF": settings.FAVICON_HREF,
"SITE_TITLE": settings.SITE_TITLE,
Expand Down
4 changes: 2 additions & 2 deletions dje/templates/admin/base_site.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
{% load i18n grp_tags static %}

{% block title %}
{{ SITE_TITLE }} {{ DEJACODE_VERSION }} Administration
{{ SITE_TITLE }} Administration v{{ DEJACODE_VERSION }}
{% endblock %}

{% block admin_title %}
<h1 id="grp-admin-title">
{{ SITE_TITLE }} {{ DEJACODE_VERSION }} Administration
{{ SITE_TITLE }} Administration v{{ DEJACODE_VERSION }}
</h1>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion dje/templates/includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<a class="dropdown-item" href="https://github.com/nexB/dejacode/releases" target="_blank" rel="noreferrer">{% trans 'Releases' %}</a>
<a class="dropdown-item" href="https://scancode-licensedb.aboutcode.org/agpl-3.0.html" target="_blank" rel="noreferrer">{% trans 'License' %}</a>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">{{ DEJACODE_VERSION }}</h6>
<h6 class="dropdown-header">v{{ DEJACODE_VERSION }}</h6>
</div>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion dje/templates/includes/navbar_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
</a>
{% endif %}
<div class="dropdown-divider"></div>
<div class="dropdown-header">{{ DEJACODE_VERSION }}</div>
<div class="dropdown-header">v{{ DEJACODE_VERSION }}</div>
<div class="dropdown-divider"></div>
<form id="logout-form" method="post" action="{% url 'logout' %}">
{% csrf_token %}
Expand Down

0 comments on commit 6cef213

Please sign in to comment.