-# -*- 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
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: