version script test

This commit is contained in:
vabene1111
2020-06-10 10:07:33 +02:00
parent 1d6375bf84
commit 01b9022451
4 changed files with 17 additions and 2 deletions

View File

@@ -16,7 +16,10 @@
Django Recipes is an open source free software application. It can be found on <a href="https://github.com/vabene1111/recipes">GitHub</a>.
Changelogs can be found <a href="https://github.com/vabene1111/recipes/releases">here</a>.
{% endblocktrans %}
<br/>
<br/>
Current Version: {{ version }}<br/>
Ref: {{ ref }}
<br/>
<br/>
<br/>

View File

@@ -20,6 +20,8 @@ from cookbook.forms import *
from cookbook.helper.permission_helper import group_required
from cookbook.tables import RecipeTable, RecipeTableSmall, CookLogTable, ViewLogTable
from recipes.version import *
def index(request):
if not request.user.is_authenticated:
@@ -267,7 +269,8 @@ def history(request):
@group_required('admin')
def system(request):
postgres = False if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2' else True
return render(request, 'system.html', {'gunicorn_media': settings.GUNICORN_MEDIA, 'debug': settings.DEBUG, 'postgres': postgres})
return render(request, 'system.html', {'gunicorn_media': settings.GUNICORN_MEDIA, 'debug': settings.DEBUG, 'postgres': postgres, 'version': VERSION_NUMBER, 'ref': BUILD_REF})
def setup(request):