예제 #1
0
 def _process(self):
     form = AdminSettingsForm(obj=FormDefaults(**settings.get_all()))
     if form.validate_on_submit():
         settings.set_multi(form.data)
         flash(_("Settings saved"), "success")
         return redirect(url_for(".admin_settings"))
     return WPPaymentAdmin.render_template("admin_settings.html", form=form, plugins=get_payment_plugins().values())
예제 #2
0
 def _process(self):
     form = AdminSettingsForm(obj=FormDefaults(**settings.get_all()))
     if form.validate_on_submit():
         settings.set_multi(form.data)
         flash(_('Settings saved'), 'success')
         return redirect(url_for('.admin_settings'))
     return WPPaymentAdmin.render_template('admin_settings.html', form=form, plugins=get_payment_plugins().values())