fix adminconfigview

This commit is contained in:
bakatrouble 2019-01-19 09:59:20 +03:00
parent 999c6af8e7
commit b91ec55c6e

View File

@ -30,6 +30,9 @@ class LoginView(BaseLoginView):
class AdminConfigView(CabinetViewMixin, FormView): class AdminConfigView(CabinetViewMixin, FormView):
template_name = 'cabinet/admin_config.html' template_name = 'cabinet/admin_config.html'
def get_success_url(self):
return ''
def get_title(self): def get_title(self):
return '{} config'.format(self.get_form_class().title) return '{} config'.format(self.get_form_class().title)
@ -38,3 +41,7 @@ class AdminConfigView(CabinetViewMixin, FormView):
if form.slug == self.kwargs.get('slug'): if form.slug == self.kwargs.get('slug'):
return form return form
raise Http404() raise Http404()
def form_valid(self, form):
form.save()
return super(AdminConfigView, self).form_valid(form)