# HG changeset patch # User Daniele Nicolodi # Date 1308128798 -7200 # Node ID 2fd80a9ec3a2519aad84d4e8ea141d1b929506c5 # Parent 92d05dfff3aa6a1091d6f1119f58781aa351859b Add action and method parameters to form objects. diff -r 92d05dfff3aa -r 2fd80a9ec3a2 src/ltpdarepo/form.py --- a/src/ltpdarepo/form.py Wed Jun 15 11:05:07 2011 +0200 +++ b/src/ltpdarepo/form.py Wed Jun 15 11:06:38 2011 +0200 @@ -20,6 +20,9 @@ # token field csrf = wtforms.fields.HiddenField() + method = 'POST' + action = '' + def __init__(self, formdata=None, *args, **kwargs): # set token token = session.get(CSRF_SESSION_KEY, None) diff -r 92d05dfff3aa -r 2fd80a9ec3a2 src/ltpdarepo/templates/forms.html --- a/src/ltpdarepo/templates/forms.html Wed Jun 15 11:05:07 2011 +0200 +++ b/src/ltpdarepo/templates/forms.html Wed Jun 15 11:06:38 2011 +0200 @@ -1,5 +1,5 @@ {% macro render(form) -%} -
+
{% for field in form %} {{ render_form_field(field) }}