diff --git a/CHANGELOG.md b/CHANGELOG.md index 1edb167b..f0bf4685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## Unreleased + +- Don't cache WasteWizardPages, as they need to be cookie-sensitive + ## 78.0 (2024-08-13) Compare: diff --git a/bc/standardpages/models.py b/bc/standardpages/models.py index db9f209b..f89e3fc5 100644 --- a/bc/standardpages/models.py +++ b/bc/standardpages/models.py @@ -3,7 +3,9 @@ from django.core.exceptions import ValidationError from django.db import models from django.shortcuts import redirect +from django.utils.decorators import method_decorator from django.utils.functional import cached_property +from django.views.decorators.cache import never_cache from modelcluster.fields import ParentalKey from wagtail.admin.panels import FieldPanel, InlinePanel @@ -73,6 +75,7 @@ class Meta: block_counts = {"waste_wizard": {"max_num": 1}} +@method_decorator(never_cache, name="serve") class WasteWizardPage(BaseInformationPage): template = "patterns/pages/standardpages/information_page.html" is_waste_wizard_page = True