X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/3c949ed2b4a7050c69b68fe2d27aaf4df4ed88a8..084f20588e607aa9ae3ed280b6a2f0349b6a3200:/src/funding/views.py diff --git a/src/funding/views.py b/src/funding/views.py index 18000c05d..d6d6570bf 100644 --- a/src/funding/views.py +++ b/src/funding/views.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.core.paginator import Paginator, InvalidPage -from django.core.urlresolvers import reverse from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render +from django.urls import reverse from django.views.decorators.csrf import csrf_exempt from django.views.generic import TemplateView, FormView, ListView from getpaid.models import Payment @@ -88,7 +87,9 @@ class OfferDetailView(FormView): raise Http404 return super(OfferDetailView, self).dispatch(request, slug) - def get_form(self, form_class): + def get_form(self, form_class=None): + if form_class is None: + form_class = self.get_form_class() if self.request.method == 'POST': return form_class(self.object, self.request.POST) else: