From b91ec55c6e0e0356294b5bfe0865e71187885173 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Sat, 19 Jan 2019 09:59:20 +0300 Subject: [PATCH] fix adminconfigview --- cabinet/views.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cabinet/views.py b/cabinet/views.py index aac0ecb..d2dfe14 100644 --- a/cabinet/views.py +++ b/cabinet/views.py @@ -30,6 +30,9 @@ class LoginView(BaseLoginView): class AdminConfigView(CabinetViewMixin, FormView): template_name = 'cabinet/admin_config.html' + def get_success_url(self): + return '' + def get_title(self): return '{} config'.format(self.get_form_class().title) @@ -38,3 +41,7 @@ class AdminConfigView(CabinetViewMixin, FormView): if form.slug == self.kwargs.get('slug'): return form raise Http404() + + def form_valid(self, form): + form.save() + return super(AdminConfigView, self).form_valid(form)