diff --git a/amelie/personal_tab/templates/cookie_corner_dashboard.html b/amelie/personal_tab/templates/cookie_corner_dashboard.html
index 5aff846..9c645b5 100644
--- a/amelie/personal_tab/templates/cookie_corner_dashboard.html
+++ b/amelie/personal_tab/templates/cookie_corner_dashboard.html
@@ -52,7 +52,7 @@
{% trans 'History of exam credit' %}
- {% trans 'Cookie Corner Wrapped' %} {{ last_year }}
+ {% trans 'Cookie Corner Wrapped' %} {{ wrapped_year }}
{% endif %}
diff --git a/amelie/personal_tab/views.py b/amelie/personal_tab/views.py
index 1df06dd..041dae2 100644
--- a/amelie/personal_tab/views.py
+++ b/amelie/personal_tab/views.py
@@ -4,6 +4,8 @@
import logging
from decimal import Decimal
import itertools
+
+import django.conf
import operator
from django.contrib import messages
from django.contrib.auth.decorators import login_required
@@ -634,7 +636,7 @@ def dashboard(request, pk, slug):
'debt_collection_instructions': debt_collection_instructions,
'exam_cookie_credits': exam_cookie_credits,
'date_old_authorizations': date_old_authorizations,
- 'last_year': datetime.date.today().year - 1
+ 'wrapped_year': django.conf.settings.COOKIE_CORNER_WRAPPED_YEAR
})
@@ -1716,7 +1718,7 @@ def authorization_view(request, authorization_id):
@require_lid
def cookie_corner_wrapped_main(request):
- COOKIE_CORNER_WRAPPED_YEAR = datetime.date.today().year - 1
+ COOKIE_CORNER_WRAPPED_YEAR = django.conf.settings.COOKIE_CORNER_WRAPPED_YEAR
person = request.person
language = get_language()
diff --git a/amelie/settings/generic.py b/amelie/settings/generic.py
index 7ebc1e0..10de26a 100644
--- a/amelie/settings/generic.py
+++ b/amelie/settings/generic.py
@@ -5,6 +5,7 @@
import os
import re
import saml2
+import datetime
from datetime import date
from decimal import Decimal
@@ -901,3 +902,5 @@
KEYCLOAK_API_CLIENT_SECRET = ""
KEYCLOAK_API_AUTHN_ENDPOINT = "https://auth.ia.utwente.nl/realms/inter-actief/protocol/openid-connect/token"
KEYCLOAK_PROVIDERS_UNLINK_ALLOWED = ['github', 'google', 'linkedin']
+
+COOKIE_CORNER_WRAPPED_YEAR = datetime.date.today().year - 1