From eca722313c44362a30ea5c6d8204ea2bc40870ba Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Wed, 3 Jul 2024 15:57:48 +0100 Subject: [PATCH] Generate more complex tokens using timestamps --- wcivf/apps/feedback/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcivf/apps/feedback/models.py b/wcivf/apps/feedback/models.py index 6db73a42d..7f0aa523a 100644 --- a/wcivf/apps/feedback/models.py +++ b/wcivf/apps/feedback/models.py @@ -1,3 +1,4 @@ +import time import uuid from django.conf import settings @@ -18,7 +19,8 @@ def generate_feedback_token(): - return uuid.uuid4().hex + timestamp = str(int(time.time())) + return timestamp + uuid.uuid4().hex class Feedback(TimeStampedModel):