thank you for your replied luifran, but, it's not working, any example or
url maybe?
thank you very much before

On Sat, May 21, 2011 at 7:26 PM, luifran <[email protected]> wrote:

> In the view must be for example {{=add}}
>
> On 21 mayo, 12:00, 黄祥 <[email protected]> wrote:
> > hi,
> >
> > is there any class example on book or appliances, so that i can learn
> > from it?
> > i've already tried the simple things what written on book, but got an
> > error. do you have any hints or solutions?
> > thank you so much before
> >
> > e.g.
> > === controller ===
> >
> > class MyClass(object):
> >     z = 2
> >     def __init__(self, a, b):
> >         self.x = a, self.y = b
> >     def add(self):
> >         return self.x + self.y + self.z
> >
> > def index():
> >     myinstance = MyClass(3, 4)
> >     add = myinstance.add()
> >     return dict(add = add)
> >
> > === view ===
> > {{add}}

Reply via email to