From 333eb003124601e90e2b9d04c154386a17cd27d4 Mon Sep 17 00:00:00 2001
From: David Schmitz <schmitz@lrz.de>
Date: Wed, 7 Dec 2022 08:47:00 +0000
Subject: [PATCH] requirements version update: necessary adaptions

---
 flowspec/test_viewsets.py | 5 +++++
 flowspec/views.py         | 3 ++-
 flowspy/settings.py.dist  | 5 ++++-
 requirements.txt          | 4 ++--
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/flowspec/test_viewsets.py b/flowspec/test_viewsets.py
index 639d9248..184de354 100644
--- a/flowspec/test_viewsets.py
+++ b/flowspec/test_viewsets.py
@@ -9,6 +9,11 @@ from rest_framework.authtoken.models import Token
 import requests
 #import list
 
+#if DEBUG:
+#        warnings.simplefilter('ignore', category=RemovedInDjango40Warning)
+
+#
+
 assert settings.ROUTES_DUPLICATES_CHECKING == False
 
 #dirname1 = os.path.dirname(__file__)
diff --git a/flowspec/views.py b/flowspec/views.py
index 9e02b6be..b6fb570a 100644
--- a/flowspec/views.py
+++ b/flowspec/views.py
@@ -521,7 +521,8 @@ def edit_route(request, route_slug):
     else:
         if (not route_original.status == 'ACTIVE'):
             route_edit.expires = datetime.date.today() + datetime.timedelta(days=settings.EXPIRATION_DAYS_OFFSET-1)
-        dictionary = model_to_dict(route_edit, fields=[], exclude=[])
+        #dictionary = model_to_dict(route_edit, fields=[], exclude=[])
+        dictionary = model_to_dict(route_edit, exclude=[])
         dictionary["name"] = route_edit.name_visible
         if request.user.is_superuser:
             dictionary['issuperuser'] = request.user.username
diff --git a/flowspy/settings.py.dist b/flowspy/settings.py.dist
index 6f251cd6..6ecead59 100644
--- a/flowspy/settings.py.dist
+++ b/flowspy/settings.py.dist
@@ -189,7 +189,10 @@ TEMPLATES = [
                 "django.contrib.auth.context_processors.auth",
                 'django_settings_export.settings_export',
                 'django.contrib.messages.context_processors.messages'
-            ]
+            ],
+            'libraries': { # Adding this section should work around the issue.
+                'staticfiles' : 'django.templatetags.static',
+            }
         },
     },
 ]
diff --git a/requirements.txt b/requirements.txt
index 43011e79..9b2fc0b5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-setuptools==59.1.1
+setuptools
 argparse
 cl
 celery==5.2.3
@@ -9,7 +9,7 @@ djangorestframework==3.12.0
 django-tinymce
 django-form-utils
 django-settings-export
-Django==2.2.28
+Django==3.2.16
 gevent
 greenlet
 gunicorn
-- 
GitLab