Skip to content

Commit

Permalink
Merge branch 'fix/no-cache-waste-wizard' into 'release'
Browse files Browse the repository at this point in the history
Fix/no cache waste wizard

See merge request buckinghamshire-council/bc!734
  • Loading branch information
alxbridge committed Aug 13, 2024
2 parents 4d42c78 + eacd5b4 commit 34fc5ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## Unreleased

- Don't cache WasteWizardPages, as they need to be cookie-sensitive

## 78.0 (2024-08-13)

Compare: <https://git.torchbox.com/buckinghamshire-council/bc/compare/77.0...78.0>
Expand Down
3 changes: 3 additions & 0 deletions bc/standardpages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 34fc5ff

Please sign in to comment.