mirror of https://gitlab.com/brutaldon/brutaldon
Update version string, and move it into the config file
This commit is contained in:
parent
efcaa76130
commit
7ea5ecca89
|
@ -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
|
# 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
|
# write any magic numbers into the validation code
|
||||||
TOOT_MAX_LENGTH = 500
|
TOOT_MAX_LENGTH = 500
|
||||||
|
|
||||||
|
# Version number displayed on about page
|
||||||
|
BRUTALDON_VERSION = "1.2.1"
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
This is version 1.2 of brutaldon.
|
This is version {{ version }} of brutaldon.
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from django.http import HttpResponse, Http404
|
from django.http import HttpResponse, Http404
|
||||||
|
from django.conf import settings as django_settings
|
||||||
from django.shortcuts import render, redirect
|
from django.shortcuts import render, redirect
|
||||||
from django.views.decorators.cache import never_cache, cache_page
|
from django.views.decorators.cache import never_cache, cache_page
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
@ -561,8 +562,10 @@ def search_results(request):
|
||||||
"fullbrutalism": fullbrutalism_p(request)})
|
"fullbrutalism": fullbrutalism_p(request)})
|
||||||
|
|
||||||
def about(request):
|
def about(request):
|
||||||
|
version = django_settings.BRUTALDON_VERSION
|
||||||
return render(request, 'about.html',
|
return render(request, 'about.html',
|
||||||
{"fullbrutalism": fullbrutalism_p(request),
|
{"fullbrutalism": fullbrutalism_p(request),
|
||||||
|
"version": version,
|
||||||
'own_acct': request.session.get('user', None),
|
'own_acct': request.session.get('user', None),
|
||||||
})
|
})
|
||||||
def privacy(request):
|
def privacy(request):
|
||||||
|
|
Loading…
Reference in New Issue