This is very cool, I changed .pt to: <html> <head></head> <body> <span tal:replace="structure addform"> form </span> </body>
</html> and it works! It seems the genshi style ${...} is causing the problem. So should it always be discouraged? On Fri, Oct 23, 2009 at 4:53 PM, Tim Hoffman <zutes...@gmail.com> wrote: > In normal zpt tal:content="form" would do what you are seeing, where as > tal:content="structure form" means let any html through without quoting it. > > But you are using a slight variant so not sure what special incantation you > need. > > Rgds > > Tim > > > On Sat, Oct 24, 2009 at 7:17 AM, george hu <geo...@gmail.com> wrote: > >> My .pt file : >> >> <html> >> <head></head> >> <body> >> ${addform} >> </body> >> >> </html> >> >> in view: >> def add_form(request): >> import formish >> import schemaish >> >> schema=schemaish.Structure() >> schema.add('name',schemaish.String()) >> schema.add('gender',schemaish.String()) >> >> form=Form(schema) >> >> return {'addform':form()} >> >> >> But the final rendered page is like following: >> <form action="" class="formish-form" method="post" >> enctype="multipart/form-data" accept-charset="utf-8"> <div> <input >> type="hidden" name="_charset_" /></div> <div id="name--field" class="field >> name type-string widget-input"> <label for="name">Name</label> <div >> class="inputs"><input id="name" type="text" name="name" value="" /></div> >> </div> <div id="gender--field" class="field gender type-string >> widget-input"> <label for="gender">Gender</label> <div class="inputs"><input >> id="gender" type="text" name="gender" value="" /></div> </div> <div >> id="weight--field" class="field weight type-integer widget-input"> <label >> for="weight">Weight</label> <div class="inputs"><input id="weight" >> type="text" name="weight" value="" /></div> </div> <div class="actions"> >> <input type="submit" id="action" value="Submit" name="" /> </div> </form> >> when I look at the source I see the < is <, and the > is > >> >> _______________________________________________ >> Repoze-dev mailing list >> Repoze-dev@lists.repoze.org >> http://lists.repoze.org/listinfo/repoze-dev >> >> >
_______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev