diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index fbc5892..3f4ccdb 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -10,6 +10,7 @@ from django_ckeditor_5.fields import CKEditor5Field from urllib.parse import urlparse from django.core.cache import cache +import hashlib import urllib.request import os from django.core.files import File @@ -216,6 +217,7 @@ class Tag(models.Model): def get_tag_groups(nb_suggestions=10, exclude=False, include=False, all=False): id_cache = 'all_tags ' + str(exclude) + ' ' + str(include) + ' ' + str(nb_suggestions) + id_cache = hashlib.md5(id_cache.encode("utf8")).hexdigest() result = cache.get(id_cache) if not result: