aboutsummaryrefslogtreecommitdiffstats
path: root/servo/views
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2016-07-13 16:30:00 +0300
committerFilipp Lepalaan <filipp@mac.com>2016-07-13 16:30:00 +0300
commit727cbb7ac26b0db6922d0d3911cf1e6b69234a66 (patch)
tree27518900ecb40398ed203b678bc586535edc64c2 /servo/views
parent9e5f553863749b5bb0a83e597b2f962b0d91e442 (diff)
downloadServo-727cbb7ac26b0db6922d0d3911cf1e6b69234a66.tar.gz
Servo-727cbb7ac26b0db6922d0d3911cf1e6b69234a66.tar.bz2
Servo-727cbb7ac26b0db6922d0d3911cf1e6b69234a66.zip
FileWrapper removed from Django 1.9
Use from wsgiref.util instead
Diffstat (limited to 'servo/views')
-rw-r--r--servo/views/account.py8
-rw-r--r--servo/views/admin.py2
2 files changed, 6 insertions, 4 deletions
diff --git a/servo/views/account.py b/servo/views/account.py
index 5d5c376..38e63c4 100644
--- a/servo/views/account.py
+++ b/servo/views/account.py
@@ -8,9 +8,8 @@ from django.contrib import auth
from django.utils import timezone, translation
from django.contrib import messages
-from django.http import QueryDict
-from django.http import HttpResponse
from django.core.urlresolvers import reverse
+from django.http import QueryDict, HttpResponse
from dateutil.relativedelta import relativedelta
from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import permission_required
@@ -306,7 +305,10 @@ def edit_calendar_event(request, cal_pk, pk=None):
@permission_required("servo.change_calendar")
def finish_calendar_event(request, cal_pk, pk):
- event = get_object_or_404(get_object_or_404, pk=pk)
+ """
+ Marks an event as being finished
+ """
+ event = get_object_or_404(CalendarEvent, pk=pk)
event.set_finished()
messages.success(request, _(u'Calendar event updated'))
return redirect(view_calendar, cal_pk, 'week')
diff --git a/servo/views/admin.py b/servo/views/admin.py
index 4f1d568..9924f2b 100644
--- a/servo/views/admin.py
+++ b/servo/views/admin.py
@@ -696,7 +696,7 @@ class Backup(object):
self.filesize = os.path.getsize(path)
def get_wrapper(self):
- from django.core.servers.basehttp import FileWrapper
+ from wsgiref.util import FileWrapper
return FileWrapper(file(self.path))
def get_response(self):