If what you like with Stan is the way to write html, I suggest to use
formencode.htmlgen (already in TG)

(Copy from an other thread)

 ...
from formencode.htmlgen import html as T
...
class DivForm(TableForm):
    template = str(
        T.form(name="${widget.name}",
xmlns__py="http://purl.org/kid/ns#";, action="${getattr(self, 'action',
None)}", method="${getattr(self, 'method', 'post')}", onsubmit="return
validateForm(this)")(
                T.div(id="f_${widget.name}_errors_",
class_="formFieldErrors")(
                    T.span(py__if="getattr(self, errors, None)",
py__replace="getattr(self, errors, None)")
                ),
                T.div(py__for="widget in widgets",
py__replace="XML(widget.insert(getattr(self, widget.name, None),
input_values, widget_error.get(widget.name, None)))"),
                T.div(id="f_${widget.name}_actions_",
class_="formActions")(
                    T.input(type="submit", id="btn_save",
name="btn_save", value="save", class_="button")
                ),
            )
        ) 

If I've got time, I'll create a page in the wiki

Reply via email to