From ca5b2a1c64cdd13412fd2e3ba92c3df1d6d8bb6f Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Tue, 5 Jan 2021 00:02:48 +0100 Subject: [PATCH 1/6] Bump django to > 3.1 --- requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/base.txt b/requirements/base.txt index 534dad3..4c1fae8 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -8,7 +8,7 @@ wheel # Django # ----------------------- -django>=2.2,<3 +django>=3.1,<3.3 django-allauth>=0.42,<0.45 # https://django-allauth.readthedocs.io django-crispy-forms==1.11.* # https://django-crispy-forms.readthedocs.io django-ckeditor>=6.0,<6.8 From 97e6bd9e1ead879cc685d41b6149026ed651e58a Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Tue, 5 Jan 2021 00:03:24 +0100 Subject: [PATCH 2/6] Remove render_to_response --- elgeopaso/cms/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elgeopaso/cms/views.py b/elgeopaso/cms/views.py index 6c3d9c3..73311db 100644 --- a/elgeopaso/cms/views.py +++ b/elgeopaso/cms/views.py @@ -37,7 +37,7 @@ def docs(request): @cache_page(60 * 60) def view_category(request, slug): category = get_object_or_404(Category, slug_name=slug) - return render_to_response( + return render( "cms/category_detail.html", { "categories": Category.objects.all(), @@ -53,7 +53,7 @@ def view_category(request, slug): @gzip_page @cache_page(60 * 60) def view_article(request, slug, category): - return render_to_response( + return render( "cms/article_detail.html", {"article": get_object_or_404(Article, slug_title=slug)}, ) From 0728744d78424000aefb64d992ef7c903ab1d0c5 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Tue, 5 Jan 2021 00:14:15 +0100 Subject: [PATCH 3/6] Use load static instead of deprecated tags --- elgeopaso/cms/templates/cms/about.html | 2 +- elgeopaso/templates/admin/base_site.html | 2 +- elgeopaso/templates/jobs/search.html | 2 +- elgeopaso/templates/jobs/timeline.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/elgeopaso/cms/templates/cms/about.html b/elgeopaso/cms/templates/cms/about.html index 0a86f49..ec7eae5 100644 --- a/elgeopaso/cms/templates/cms/about.html +++ b/elgeopaso/cms/templates/cms/about.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block content %}
{{ content|safe }}
{% endblock content %} diff --git a/elgeopaso/templates/admin/base_site.html b/elgeopaso/templates/admin/base_site.html index c861462..ccb3305 100644 --- a/elgeopaso/templates/admin/base_site.html +++ b/elgeopaso/templates/admin/base_site.html @@ -1,5 +1,5 @@ {% extends "admin/base.html" %} -{% load admin_static %} +{% load static %}