def setup(app, plugin): app.add_theme('vessel', TEMPLATE_FILES, plugin.metadata, configuration_page=configure) app.add_shared_exports('vessel_theme', SHARED_FILES) app.add_config_var('vessel_theme/variation', forms.TextField(default=blue_variation))
def setup(app, plugin): app.connect_event('process-doc-tree', process_doc_tree) app.connect_event('modify-admin-navigation-bar', add_config_link) app.add_url_rule('/options/typography', prefix='admin', endpoint='typography/config') app.add_view('typography/config', show_config) app.add_template_searchpath(TEMPLATES) for ignore, name, default in _rules: app.add_config_var('typography/' + name, forms.TextField(default=default))
def setup(app, plugin): print "setup(): enter" app.add_config_var('analytics/account', forms.TextField(default=u'')) app.connect_event('before-metadata-assembled', add_analytics_to_metadata) app.add_template_searchpath(TEMPLATES) app.add_url_rule('/options/analytics', prefix='admin', endpoint=CONFIG_ENDPOINT, view=show_analytics_config) app.connect_event('modify-admin-navigation-bar', ConfigLink('options', 'analytics', CONFIG_ENDPOINT, 'Google Analytics'))
def setup(app, plugin): if not have_pygments: raise SetupError('The pygments plugin requires the pygments library ' 'to be installed.') app.connect_event('modify-admin-navigation-bar', add_pygments_link) app.connect_event('after-request-setup', inject_style) app.add_config_var('pygments_support/style', forms.TextField(default=u'default')) app.add_markup_extension(SourcecodeExtension) app.add_url_rule('/options/pygments', prefix='admin', view=show_config, endpoint='pygments_support/config') app.add_url_rule('/_shared/pygments_support/<style>.css', view=get_style, endpoint='pygments_support/style') app.add_template_searchpath(TEMPLATES)
def setup(app, plugin): app.add_config_var('akismet_spam_filter/apikey', forms.TextField(default=u'')) app.add_url_rule('/options/akismet', prefix='admin', endpoint='akismet_spam_filter/config', view=show_akismet_config) app.add_url_rule('/comments/stats', prefix='admin', endpoint='akismet_spam_filter/stats', view=show_akismet_stats) app.connect_event('before-comment-saved', do_spamcheck) app.connect_event('before-comment-mark-spam', do_submit_spam) app.connect_event('before-comment-mark-ham', do_submit_ham) app.connect_event('modify-admin-navigation-bar', add_akismet_links) app.add_template_searchpath(TEMPLATES) app.add_shared_exports('akismet', SHARED) app.add_widget(AkismetBlockedCommentsCounterWidget)
class ConfigurationForm(forms.Form): """The configuration form for the quotes.""" double_opening_quote = forms.TextField(required=True) double_closing_quote = forms.TextField(required=True) single_opening_quote = forms.TextField(required=True) single_closing_quote = forms.TextField(required=True)
class ConfigurationForm(forms.Form): """The configuration form.""" account = forms.TextField()
class ConfigurationForm(forms.Form): """The configuration form.""" api_key = forms.TextField(validators=[is_valid_key()])