def _process(self): form = AnnouncementForm(obj=FormDefaults(**announcement_settings.get_all())) if form.validate_on_submit(): announcement_settings.set_multi(form.data) flash(_('Settings have been saved'), 'success') return redirect(url_for('announcement.manage')) return WPAnnouncement.render_template('settings.html', form=form)