| Newsgroups |
gmane.comp.python.cheetah |
| Message-ID |
<[email protected]> |
auto calling is awesome no point idsabling it
i love michaels function will make a convenience function
#def displayfloat($a)
$("%.2f"%$a)
#end def
#set $showfloat = $getVar('displayfloat', autoCall=False)
How would a convenience function look like since we use getVar
a convenience function so you don't have to type getVar blah blah blah all
the time if you need to do this a lot.
On 5/20/09, R. Tyler Ballance <[email protected]> wrote:
>
> On Wed, May 20, 2009 at 04:16:38PM -0400, Michael Higgins wrote:
> > #def foo($a)
> > <b>$a</b>
> > #end def
> >
> > #set $faa = $getVar('foo', autoCall=False)
> > $faa('hi')
>
>
> I /think/ this should work:
> #set $faa = foo
>
> Alternatively, you can use:
> #set $faa = $foo
>
> If you compile the templates with autocalling disabled
>
> >
> >
> > does what you want, I think. I'm not sure if there's a more elegant
> > approach directly in Cheetah, though of course you could write a
> > convenience function so you don't have to type getVar blah blah blah
> > all the time if you need to do this a lot.
> >
> > Mike
> >
> >
> >
> > On May 20, 2009, at 4:03 PM, [email protected] wrote:
> >
> > > oops forgot autocalling
> > > so how do we give a function another name
> > >
> > > On Wed, May 20, 2009 at 10:36 AM, R. Tyler Ballance
> > > <[email protected]> wrote:
> > > On Wed, May 20, 2009 at 03:46:57AM -0700, [email protected]
> > > wrote:
> > > > #def foo($a)
> > > > <b>$a</b>
> > > > #end def
> > > >
> > > > #set faa = $foo
> > > > $faa()
> > > > this doesnt work?
> > > > why not
> > >
> > >
> > > What do you expect this to do? Refer to the documentation for
> > > "autocalling"
> > >
> > > > --
> > > > Bidegg worlds best auction site
> > > > http://bidegg.com
> > >
> > > >
> > >
> ------------------------------------------------------------------------------
> > > > Crystal Reports - New Free Runtime and 30 Day Trial
> > > > Check out the new simplified licensing option that enables
> > > > unlimited royalty-free distribution of the report engine
> > > > for externally facing server and web deployment.
> > > > http://p.sf.net/sfu/businessobjects
> > > > _______________________________________________
> > > > Cheetahtemplate-discuss mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
> > >
> > >
> > > --
> > > -R. Tyler Ballance
> > > Slide, Inc.
> > >
> > >
> > >
> > > --
> > > Bidegg worlds best auction site
> > > http://bidegg.com
> > >
> ------------------------------------------------------------------------------
> > > Crystal Reports - New Free Runtime and 30 Day Trial
> > > Check out the new simplified licensing option that enables
> > > unlimited royalty-free distribution of the report engine
> > > for externally facing server and web deployment.
> > >
> http://p.sf.net/sfu/businessobjects_______________________________________________
> > > Cheetahtemplate-discuss mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
> >
> >
> >
> ------------------------------------------------------------------------------
> > Crystal Reports - New Free Runtime and 30 Day Trial
> > Check out the new simplified licensing option that enables
> > unlimited royalty-free distribution of the report engine
> > for externally facing server and web deployment.
> > http://p.sf.net/sfu/businessobjects
> > _______________________________________________
> > Cheetahtemplate-discuss mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
>
> --
> -R. Tyler Ballance
> Slide, Inc.
>
>
--
Bidegg worlds best auction site
http://bidegg.com
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss