diff --git a/brutaldon/settings.py b/brutaldon/settings.py index cca07fe..cde78d0 100644 --- a/brutaldon/settings.py +++ b/brutaldon/settings.py @@ -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" + diff --git a/brutaldon/templates/about.html b/brutaldon/templates/about.html index 6825ee3..37381b1 100644 --- a/brutaldon/templates/about.html +++ b/brutaldon/templates/about.html @@ -36,7 +36,7 @@
- This is version 1.2 of brutaldon. + This is version {{ version }} of brutaldon.
{% endblock %} diff --git a/brutaldon/views.py b/brutaldon/views.py index adc59b3..5271993 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -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):