From 66769ab34b604cc98a1a9a66109f6476466a0abc Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 11 Feb 2018 22:41:20 -0600 Subject: [PATCH] Stop configuring FormAlchemy engine etc. on app startup --- tailbone/app.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tailbone/app.py b/tailbone/app.py index 352b67f6..437d9808 100644 --- a/tailbone/app.py +++ b/tailbone/app.py @@ -122,9 +122,6 @@ def make_pyramid_config(settings, configure_csrf=True): """ Make a Pyramid config object from the given settings. """ - from tailbone.forms.alchemy import TemplateEngine - from tailbone.forms import renderers - config = settings.pop('pyramid_config', None) if config: config.set_root_factory(Root) @@ -158,14 +155,6 @@ def make_pyramid_config(settings, configure_csrf=True): for key, label in perms: config.add_tailbone_permission(groupkey, key, label) - # Configure FormAlchemy. - fa.config.engine = TemplateEngine() - fa.FieldSet.default_renderers[sa.Boolean] = renderers.YesNoFieldRenderer - fa.FieldSet.default_renderers[sa.Date] = renderers.DateFieldRenderer - fa.FieldSet.default_renderers[sa.DateTime] = renderers.DateTimeFieldRenderer - fa.FieldSet.default_renderers[sa.Time] = renderers.TimeFieldRenderer - fa.FieldSet.default_renderers[GPCType] = renderers.GPCFieldRenderer - return config