From 18526befb08da69b1471b54981ab0e30c34f2a26 Mon Sep 17 00:00:00 2001 From: Dorian Wood Date: Wed, 23 Oct 2024 16:42:14 -0400 Subject: [PATCH] changing django version to 4.2 from 3.2 --- Pipfile | 2 +- brutaldon/settings.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 09e8b9c..2d50d91 100644 --- a/Pipfile +++ b/Pipfile @@ -21,7 +21,7 @@ requests = "*" six = "*" "urllib3" = "*" webencodings = "*" -Django = "~=3.2" +Django = "~=4.2" django-html_sanitizer = "*" inscriptis = "*" lxml = "*" diff --git a/brutaldon/settings.py b/brutaldon/settings.py index 5fe9ea0..8d0610d 100644 --- a/brutaldon/settings.py +++ b/brutaldon/settings.py @@ -12,6 +12,14 @@ https://docs.djangoproject.com/en/2.0/ref/settings/ import os +# Work around issue in sanitizer +import django +try: + from django.utils.encoding import smart_text +except: + from django.utils.encoding import smart_str + django.utils.encoding.smart_text = smart_str + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))