Update version string, and move it into the config file

This commit is contained in:
Jason McBrayer 2018-08-16 13:10:45 -04:00
parent efcaa76130
commit 7ea5ecca89
3 changed files with 8 additions and 1 deletions

View File

@ -192,3 +192,7 @@ SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
# Later this will be a user setting, but I am adding it here so that I don't
# write any magic numbers into the validation code
TOOT_MAX_LENGTH = 500
# Version number displayed on about page
BRUTALDON_VERSION = "1.2.1"

View File

@ -36,7 +36,7 @@
</section>
<section>
This is version 1.2 of brutaldon.
This is version {{ version }} of brutaldon.
</section>
{% endblock %}

View File

@ -1,4 +1,5 @@
from django.http import HttpResponse, Http404
from django.conf import settings as django_settings
from django.shortcuts import render, redirect
from django.views.decorators.cache import never_cache, cache_page
from django.urls import reverse
@ -561,8 +562,10 @@ def search_results(request):
"fullbrutalism": fullbrutalism_p(request)})
def about(request):
version = django_settings.BRUTALDON_VERSION
return render(request, 'about.html',
{"fullbrutalism": fullbrutalism_p(request),
"version": version,
'own_acct': request.session.get('user', None),
})
def privacy(request):