From: Radek Czajka Date: Wed, 2 Oct 2019 10:52:36 +0000 (+0200) Subject: Django 2.2 X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/43b04b4146227070fc21b2f85bb7267e7fbc7d67 Django 2.2 --- diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 9e27efad..d9a10f66 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -11,7 +11,7 @@ python-slugify librarian==1.7.6 ## Django -Django==2.0.13 +Django==2.2.6 fnpdjango==0.4.3 django-pipeline==1.6.14 django-cas-ng==3.6.0 diff --git a/src/cover/forms.py b/src/cover/forms.py index e5bc400d..ea51e46b 100755 --- a/src/cover/forms.py +++ b/src/cover/forms.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # @@ -9,7 +7,7 @@ from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _, ugettext from cover.models import Image -from django.utils.text import mark_safe +from django.utils.safestring import mark_safe from PIL import Image as PILImage from cover.utils import get_flickr_data, FlickrError, URLOpener diff --git a/src/dvcs/models.py b/src/dvcs/models.py index adaf7955..6a047680 100644 --- a/src/dvcs/models.py +++ b/src/dvcs/models.py @@ -120,7 +120,7 @@ class Change(models.Model): return super(Change, self).save(*args, **kwargs) def materialize(self): - f = self.data.storage.open(self.data) + f = self.data.storage.open(self.data.name) text = f.read() f.close() return str(text, 'utf-8') diff --git a/src/redakcja/settings/__init__.py b/src/redakcja/settings/__init__.py index 71bc998c..67be05b5 100644 --- a/src/redakcja/settings/__init__.py +++ b/src/redakcja/settings/__init__.py @@ -25,6 +25,7 @@ TEMPLATES = [ "redakcja.context_processors.settings", # this is instead of media 'django.template.context_processors.csrf', "django.template.context_processors.request", + "django.contrib.messages.context_processors.messages", ], }, },