On Thu, Oct 1, 2009 at 8:27 AM, cd34 <[email protected]> wrote:
>
> On Oct 1, 5:17 am, Krishnakant <[email protected]> wrote:
>> > from cp.lib.base import BaseController, render
>> I did not see any code specifying that the form will be rendered using
>> mako.
>
> My default render function is defined in project/lib/base.py and is
> set to mako. In base.py:
>
> from pylons.templating import render_mako as render
>
>
>> > ${tmpl_context.form()|n}
>> What is the meaning of |n in that mako tenplate?
>
> n : disable all default filtering; only filters specified in the local
> expression tag will be applied.
Or if you have "from webhelpers.html import *" in myapp/lib/helpers.py:
${h.literal(tmpl_context.form())}
It doesn't matter much in this case, but in general literal() returns
a string subclass that prevents the object from being escaped later.
--
Mike Orr <[email protected]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---