what is the right way to check or convert all strings to unicode before they
are passed to the template engine
is there a way to make all the strings in locals() as unicode and pass them
in?
thanks
this is how webpy renders jinja2
from web.contrib.template import render_jinja,cache
jrender = cache(
render_jinja(
['templates/'],
encoding = 'utf-8',
globals =globals(),
))
def jinjavars(**kwargs):
kwargs.pop('self',None)
return kwargs
this is the line used to call jinja render
* return jrender.jupdates(jinjavars(**locals()))*
On Sun, Feb 28, 2010 at 2:48 AM, Armin Ronacher <[email protected]
> wrote:
> Hi,
>
> On 28.02.2010 07:07, paul jobs wrote:
>
>> as i m getting utf8 errors in jinja2
>>
> Ensure that the variables you pass to the template engine are unicode
> instead of bytestrings.
>
>
>
> Regards,
> Armin
>
> --
> You received this message because you are subscribed to the Google Groups
> "pocoo-libs" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<pocoo-libs%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/pocoo-libs?hl=en.
>
>
--
Amazing wedding entrance viral video
http://fotoroll.com/sv?q=jk%20wedding%20entrance%20dance%20Amazing%20wedding%20video
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" 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/pocoo-libs?hl=en.