12 Fine Control over Cheetah-generated Python modules
12.1 Setting the source code encoding: #encoding Including #encoding UTF-8 in your Cheetah .tmpl file will result in # -*- coding: UTF-8 -*- being appended to the top of the .py module file that Cheetah's compiler generates. See http://www.python.org/doc/2.3/whatsnew/section-encodings.html for more details. On Fri, Mar 20, 2009 at 9:50 AM, Brent Pedersen <[email protected]> wrote: > > thats a cheetah question: maybe this: > > http://www.cheetahtemplate.org/docs/users_guide_html/users_guide.html#errorHandling.errorCatcher > or this: > http://www.cheetahtemplate.org/docs/users_guide_html/users_guide.html#SECTION000670000000000000000 > > On Fri, Mar 20, 2009 at 9:26 AM, paul jobs <[email protected]> wrote: > > Brent > > Thanks > > this works > > but there a lot of templates that we alredy have in like 100s i think > > Would it be possible to set a default NameMapper > > Thanks > > On Fri, Mar 20, 2009 at 8:37 AM, Brent Pedersen <[email protected]> > wrote: > >> > >> instead of sending in your variables directly, you can put them all in a > >> dict: > >> render.index(d=dict(name=name)) > >> > >> then use d.get('name, '') > >> > >> in the template. > >> > >> On Fri, Mar 20, 2009 at 2:31 AM, <[email protected]> wrote: > >> > > >> > > >> > is it possible to not throw exceptions if undefined variables are > >> > accessed > >> > in cheetah > >> > > >> > > > >> > > >> > >> > > > > > > > > -- > > BidEgg - Worlds best low price Auction site > > http://bidegg.com > > > > BidEgg - Worlds best low price Auction site > > > > > > > > > > > -- BidEgg - Worlds best low price Auction site http://bidegg.com BidEgg - Worlds best low price Auction site --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
