diff --git a/setup.py b/setup.py index b61c20ce..96e9458d 100644 --- a/setup.py +++ b/setup.py @@ -90,6 +90,7 @@ requires = [ 'paginate_sqlalchemy', # 0.2.0 'pyramid_beaker>=0.6', # 0.6.1 'pyramid_debugtoolbar', # 1.0 + 'pyramid_deform', # 0.2 'pyramid_exclog', # 0.6 'pyramid_mako', # 1.0.2 'pyramid_simpleform', # 0.6.1 diff --git a/tailbone/app.py b/tailbone/app.py index 3ccf4ab2..3604c52b 100644 --- a/tailbone/app.py +++ b/tailbone/app.py @@ -129,6 +129,7 @@ def make_pyramid_config(settings): if config: config.set_root_factory(Root) else: + settings.setdefault('pyramid_deform.template_search_path', 'tailbone:templates/deform') config = Configurator(settings=settings, root_factory=Root) # configure user authorization / authentication @@ -140,6 +141,7 @@ def make_pyramid_config(settings): # Bring in some Pyramid goodies. config.include('tailbone.beaker') + config.include('pyramid_deform') config.include('pyramid_mako') config.include('pyramid_tm') diff --git a/tailbone/templates/deform/checkbox.pt b/tailbone/templates/deform/checkbox.pt new file mode 100644 index 00000000..d149f7d1 --- /dev/null +++ b/tailbone/templates/deform/checkbox.pt @@ -0,0 +1,13 @@ +
+ +
diff --git a/tailbone/templates/forms2/deform.mako b/tailbone/templates/forms2/deform.mako index 29d264ea..e9d0b1a5 100644 --- a/tailbone/templates/forms2/deform.mako +++ b/tailbone/templates/forms2/deform.mako @@ -28,7 +28,7 @@ ${h.csrf_token(request)} % if field.error:
${field.error.msg}
% endif - +
${field.serialize()|n}