summaryrefslogtreecommitdiffstats
path: root/combo/apps/lingo/manager_views.py
diff options
context:
space:
mode:
Diffstat (limited to 'combo/apps/lingo/manager_views.py')
-rw-r--r--combo/apps/lingo/manager_views.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/combo/apps/lingo/manager_views.py b/combo/apps/lingo/manager_views.py
index ed2afb4..d9a8e01 100644
--- a/combo/apps/lingo/manager_views.py
+++ b/combo/apps/lingo/manager_views.py
@@ -27,31 +27,23 @@ from django.http import HttpResponse
import eopayment
+from .forms import RegieForm
from .models import PaymentBackend, Regie, Transaction
-REGIE_FIELDS = ['label', 'slug', 'description', 'payment_backend', 'is_default', 'webservice_url',
- 'extra_fees_ws_url', 'payment_min_amount', 'text_on_success']
-
-
class RegieListView(ListView):
model = Regie
class RegieCreateView(CreateView):
model = Regie
- fields = REGIE_FIELDS
+ fields = ['label', 'slug', 'description', 'payment_backend']
success_url = reverse_lazy('lingo-manager-regie-list')
- def get_initial(self):
- if self.model.objects.all().count() == 0:
- return {'is_default': True}
- return {}
-
class RegieUpdateView(UpdateView):
model = Regie
- fields = REGIE_FIELDS
+ form_class = RegieForm
success_url = reverse_lazy('lingo-manager-regie-list')