Hi,
I'm trying to render a form using templates, and it is escaping all form 
tags.
Code:
import web
from web import form

urls = (
    '/', 'index'
)

nancy_form = form.Form(
    form.Textarea('answer'),
)

class index:
    def GET(self):
input = web.input(sentence=None)
render = web.template.render('templates/')
question = "Hello"
form = nancy_form()
return render.nancy(question, form)

if __name__ == "__main__":
    app = web.application(urls, globals())
    app.run()

nancy.py
$def with (question, form)

$if question:
   Question: $question

<form name="main" method="POST">
$:form.render()
<input type="submit"/>
</form>

Page source:
<html>

<head></head>

<body>

<pre> Question: Hello &lt;form name="main" method="POST"&gt; &lt;table&gt; 
&lt;tr&gt;&lt;th&gt;&lt;label 
for="answer"&gt;answer&lt;/label&gt;&lt;/th&gt;&lt;td&gt;&lt;textarea 
id="answer" name="answer"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;/table&gt; &lt;input type="submit"/&gt; &lt;/form&gt; </pre>

</body>

</html>

Thanks for the help.

-Aaron

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/webpy/-/ppXxvBLJXX0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to