-# -*- 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.
#
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
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')
"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",
],
},
},