Skip to content
Snippets Groups Projects
Commit dfb769ac authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Use a uuid hex as the newsletter cachebuster

parent d6c40590
No related branches found
No related tags found
No related merge requests found
import logging import logging
from time import time import uuid
from django.conf import settings from django.conf import settings
from django.contrib import messages from django.contrib import messages
...@@ -86,7 +86,7 @@ class MailchimpSubscribeView(FormMixin, RedirectView): ...@@ -86,7 +86,7 @@ class MailchimpSubscribeView(FormMixin, RedirectView):
origin = self.request.META['HTTP_REFERER'] origin = self.request.META['HTTP_REFERER']
# Add cache busting query string. # Add cache busting query string.
return origin + '?newsletter-' + str(time.time()) return origin + '?newsletter-' + uuid.uuid4().hex
def get_redirect_url(self): def get_redirect_url(self):
# We don't know where you came from, go home # We don't know where you came from, go home
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment