X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/bee7cca13d8612ecd13592315e6022fcdadcba32..c65314d0db1d45ec00001b207e633072cb17c156:/src/picture/views.py diff --git a/src/picture/views.py b/src/picture/views.py index f42b0bb8d..27f9050fe 100644 --- a/src/picture/views.py +++ b/src/picture/views.py @@ -81,7 +81,7 @@ def import_picture(request): """docstring for import_book""" from django.http import HttpResponse from picture.forms import PictureImportForm - from django.utils.translation import ugettext as _ + from django.utils.translation import gettext as _ import_form = PictureImportForm(request.POST, request.FILES) if import_form.is_valid(): @@ -95,7 +95,7 @@ def import_picture(request): exception = pprint.pformat(info[1]) tb = '\n'.join(traceback.format_tb(info[2])) return HttpResponse(_("An error occurred: %(exception)s\n\n%(tb)s") % - {'exception': exception, 'tb': tb}, mimetype='text/plain') + {'exception': exception, 'tb': tb}, content_type='text/plain') return HttpResponse(_("Picture imported successfully")) else: return HttpResponse(_("Error importing file: %r") % import_form.errors)