From ce3795b6c4f878c496b4d46193e3379f8efb077b Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 12 Aug 2019 15:51:34 +0200 Subject: [PATCH] Django 2.2 --- requirements/requirements.txt | 2 +- src/catalogue/templates/catalogue/player.html | 2 +- .../templates/catalogue/snippets/license_icon.html | 2 +- src/catalogue/templates/catalogue/viewer_base.html | 2 +- src/catalogue/tests/test_book_import.py | 6 +++--- src/club/templates/club/payment/paypal.html | 2 +- src/club/templates/club/payment/payu-re.html | 2 +- src/club/templates/club/payment/payu.html | 2 +- src/paypal/templates/paypal/form.html | 4 ++-- src/picture/templates/picture/picture_viewer.html | 2 +- src/waiter/templates/waiter/wait.html | 2 +- src/wolnelektury/settings/apps.py | 1 + src/wolnelektury/settings/basic.py | 1 + .../templates/socialaccount/snippets/provider_list.html | 3 ++- 14 files changed, 18 insertions(+), 15 deletions(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 97ed035bc..b3fc758d6 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,7 +1,7 @@ -i https://py.mdrn.pl/simple/ # django -Django==2.1.11 +Django==2.2.4 fnpdjango==0.4 #django-pipeline==1.6.13 diff --git a/src/catalogue/templates/catalogue/player.html b/src/catalogue/templates/catalogue/player.html index 8412a3a35..2a48500ef 100755 --- a/src/catalogue/templates/catalogue/player.html +++ b/src/catalogue/templates/catalogue/player.html @@ -1,6 +1,6 @@ - {% load static from staticfiles %} + {% load static from static %} {% load i18n pipeline %} {% load catalogue_tags %} {% load thumbnail %} diff --git a/src/catalogue/templates/catalogue/snippets/license_icon.html b/src/catalogue/templates/catalogue/snippets/license_icon.html index 0dbdad3c6..c9e212e5a 100755 --- a/src/catalogue/templates/catalogue/snippets/license_icon.html +++ b/src/catalogue/templates/catalogue/snippets/license_icon.html @@ -1,5 +1,5 @@ {% load i18n %} -{% load static from staticfiles %} +{% load static from static %} {% if license_url %} {% load i18n %} -{% load static from staticfiles %} +{% load static from static %} {% load pipeline %} {% load piwik_tags %} diff --git a/src/catalogue/tests/test_book_import.py b/src/catalogue/tests/test_book_import.py index d3699249a..9ad22a4d0 100644 --- a/src/catalogue/tests/test_book_import.py +++ b/src/catalogue/tests/test_book_import.py @@ -39,7 +39,7 @@ class BookImportLogicTests(WLTestCase): self.assertEqual(book.title, "Default Book") self.assertEqual(book.slug, "default-book") - self.assert_(book.parent is None) + self.assertTrue(book.parent is None) self.assertFalse(book.has_html_file()) # no fragments generated @@ -85,7 +85,7 @@ class BookImportLogicTests(WLTestCase): self.assertEqual(book.fragments.count(), 1) self.assertEqual(book.fragments.all()[0].text, '

Ala ma kota

\n') - self.assert_(('theme', 'love') in [(tag.category, tag.slug) for tag in book.fragments.all()[0].tags]) + self.assertTrue(('theme', 'love') in [(tag.category, tag.slug) for tag in book.fragments.all()[0].tags]) def test_book_with_empty_theme(self): """ empty themes should be ignored """ @@ -97,7 +97,7 @@ class BookImportLogicTests(WLTestCase): """ book = models.Book.from_text_and_meta(ContentFile(book_text), self.book_info) - self.assert_([('theme', 'love')], + self.assertTrue([('theme', 'love')], book.fragments.all()[0].tags.filter(category='theme').values_list('category', 'slug')) def test_book_with_no_theme(self): diff --git a/src/club/templates/club/payment/paypal.html b/src/club/templates/club/payment/paypal.html index befd9f2c1..81c75042f 100644 --- a/src/club/templates/club/payment/paypal.html +++ b/src/club/templates/club/payment/paypal.html @@ -1,3 +1,3 @@ -{% load staticfiles %} +{% load static %} diff --git a/src/club/templates/club/payment/payu-re.html b/src/club/templates/club/payment/payu-re.html index a1bc573eb..8f90d53a7 100644 --- a/src/club/templates/club/payment/payu-re.html +++ b/src/club/templates/club/payment/payu-re.html @@ -1,4 +1,4 @@ -{% load staticfiles %} +{% load static %} diff --git a/src/club/templates/club/payment/payu.html b/src/club/templates/club/payment/payu.html index 60e6b6daf..4a3c7986a 100644 --- a/src/club/templates/club/payment/payu.html +++ b/src/club/templates/club/payment/payu.html @@ -1,4 +1,4 @@ -{% load staticfiles %} +{% load static %} diff --git a/src/paypal/templates/paypal/form.html b/src/paypal/templates/paypal/form.html index 9f4c76beb..92a755a8b 100644 --- a/src/paypal/templates/paypal/form.html +++ b/src/paypal/templates/paypal/form.html @@ -1,7 +1,7 @@ {% extends "base/base.html" %} {% load i18n %} {% load chunks %} -{% load static from staticfiles %} +{% load static from static %} {% block title %}{% trans "Wolne Lektury Friend Club" %}{% endblock %} @@ -22,4 +22,4 @@ {% endif %} {% chunk "klub_info" %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/picture/templates/picture/picture_viewer.html b/src/picture/templates/picture/picture_viewer.html index 6c35fe07b..3bd27b66b 100644 --- a/src/picture/templates/picture/picture_viewer.html +++ b/src/picture/templates/picture/picture_viewer.html @@ -1,6 +1,6 @@ {% extends "catalogue/viewer_base.html" %} {% load i18n %} -{% load static from staticfiles %} +{% load static from static %} {% load catalogue_tags %} {% load thumbnail %} diff --git a/src/waiter/templates/waiter/wait.html b/src/waiter/templates/waiter/wait.html index 0a0fb0d17..22f5af823 100644 --- a/src/waiter/templates/waiter/wait.html +++ b/src/waiter/templates/waiter/wait.html @@ -1,6 +1,6 @@ {% extends "base/base.html" %} {% load i18n %} -{% load static from staticfiles %} +{% load static from static %} {% block titleextra %} {% if file_url %} diff --git a/src/wolnelektury/settings/apps.py b/src/wolnelektury/settings/apps.py index 320f6ddd4..7797d3a07 100644 --- a/src/wolnelektury/settings/apps.py +++ b/src/wolnelektury/settings/apps.py @@ -41,6 +41,7 @@ INSTALLED_APPS_CONTRIB = [ # external 'django.contrib.auth', 'django.contrib.contenttypes', + 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', diff --git a/src/wolnelektury/settings/basic.py b/src/wolnelektury/settings/basic.py index c6485d64a..294ee45f0 100644 --- a/src/wolnelektury/settings/basic.py +++ b/src/wolnelektury/settings/basic.py @@ -55,6 +55,7 @@ TEMPLATES = [{ ), 'context_processors': ( 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', diff --git a/src/wolnelektury/templates/socialaccount/snippets/provider_list.html b/src/wolnelektury/templates/socialaccount/snippets/provider_list.html index 3f467b1b3..61b39024a 100644 --- a/src/wolnelektury/templates/socialaccount/snippets/provider_list.html +++ b/src/wolnelektury/templates/socialaccount/snippets/provider_list.html @@ -1,5 +1,6 @@ {% load socialaccount %} -{% load static from staticfiles %} + +{% load static from static %} {% get_providers as providers %} {% for provider in providers %} -- 2.20.1