Re: how do we get psp style tags working in cheetah

[email protected] Sat, 19 Dec 2009 12:46:10 -0800
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
   <%
   me = self.getVar('me')
   tmpsave = False
   if  me.health<0:
       me.health = 10
       tmpsave = True
   if me.bucks<=0:
       me.bucks=100
       tmpsave = True
   if tmpsave:me.save()
   %>


On Sat, Dec 19, 2009 at 12:28 AM, R. Tyler Ballance <[email protected]>wrote:

>
> On Fri, 18 Dec 2009, [email protected] wrote:
>
> >  File "/home/mark/work/common/web/cheetah.py", line 104, in render
> >     return str(compiled_tmpl)
> >   File
> >
> "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-x86_64.egg/Cheetah/Template.py",
> > line 982, in __str__
> >     def __str__(self): return getattr(self, mainMethName)()
> >   File "<string>", line 2480, in respond
> >   File "/home/mark/work/ffa.py", line 112, in __setattr__
> >     object.__setattr__(self,key,value)
> > AttributeError: can't set attribute" while reading upstream,
> >
> > *doesnt work*
>
> What code are you running to produce this?
> >
> > On Wed, Dec 16, 2009 at 12:50 PM, <[email protected]> wrote:
> >
> > > *This doesnt work*
> > > <%
> > > tmpsave = False
> > > if  me.health<0:
> > >     me.health = 10
> > >     tmpsave = True
> > > if me.bucks<=0:
> > >     me.bucks=100
> > >     tmpsave = True
> > > if tmpsave:me.save()
> > >
> > > %>
> > >
> > > *error global variable me not found*
> > > *
> > > *
> > > *
> > > *
> > > *This works*
> > >
> > > #set tmpsave = False
> > > #if  $me.health<0
> > >    #set $me.health = 10
> > >    #set tmpsave = True
> > >    #end if
> > > if me.bucks<=0
> > >     #set me.bucks=100
> > > #set     tmpsave = True
> > >     #end if
> > > #if tmpsave
> > > $me.save()
> > >     #end if
> > >
> >
> >
> >
> > --
> > Bidegg worlds best auction site
> > http://bidegg.com
>
> >
> ------------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and
> easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev
>
> > _______________________________________________
> > Cheetahtemplate-discuss mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
>
> Cheers,
> -R. Tyler Ballance
> --------------------------------------
>  Jabber: [email protected]
>  GitHub: http://github.com/rtyler
> Twitter: http://twitter.com/agentdero
>   Blog: http://unethicalblogger.com
>
>


-- 
Bidegg worlds best auction site
http://bidegg.com

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev

_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss