Show version in sidebar (fixes #5)
This commit is contained in:
parent
2223530f51
commit
25b7b1d0e5
@ -1,4 +1,4 @@
|
|||||||
{% load static rules %}
|
{% load static rules helpers %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
@ -93,6 +93,10 @@
|
|||||||
{% include 'dashboard/includes/sidebar_portal.html' with label="Sign Up" url=url %}
|
{% include 'dashboard/includes/sidebar_portal.html' with label="Sign Up" url=url %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<hr class="sep h-8">
|
||||||
|
|
||||||
|
{% sidebar_footer %}
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
<div class="md:w-10/12">
|
<div class="md:w-10/12">
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
<div class="pl-2">
|
||||||
|
<p class="support text-gray-600">
|
||||||
|
<a href="https://github.com/milesmcc/shynet">Shynet {{version}}</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
@ -3,6 +3,7 @@ from urllib.parse import urlparse
|
|||||||
import flag
|
import flag
|
||||||
import pycountry
|
import pycountry
|
||||||
from django import template
|
from django import template
|
||||||
|
from django.conf import settings
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.html import escape
|
from django.utils.html import escape
|
||||||
from django.utils.safestring import SafeString
|
from django.utils.safestring import SafeString
|
||||||
@ -80,6 +81,11 @@ def percent_change_display(start, end):
|
|||||||
|
|
||||||
return SafeString(direction + pct_change)
|
return SafeString(direction + pct_change)
|
||||||
|
|
||||||
|
@register.inclusion_tag("dashboard/includes/sidebar_footer.html")
|
||||||
|
def sidebar_footer():
|
||||||
|
return {
|
||||||
|
"version": settings.VERSION
|
||||||
|
}
|
||||||
|
|
||||||
@register.inclusion_tag("dashboard/includes/stat_comparison.html")
|
@register.inclusion_tag("dashboard/includes/stat_comparison.html")
|
||||||
def compare(
|
def compare(
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Django settings for shynet project.
|
Django settings for Shynet.
|
||||||
|
|
||||||
Generated by 'django-admin startproject' using Django 2.2.5.
|
|
||||||
|
|
||||||
For more information on this file, see
|
For more information on this file, see
|
||||||
https://docs.djangoproject.com/en/2.2/topics/settings/
|
https://docs.djangoproject.com/en/2.2/topics/settings/
|
||||||
@ -15,6 +13,9 @@ import os
|
|||||||
# Messages
|
# Messages
|
||||||
from django.contrib.messages import constants as messages
|
from django.contrib.messages import constants as messages
|
||||||
|
|
||||||
|
# Increment on new releases
|
||||||
|
VERSION = "v0.2.1"
|
||||||
|
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user