I think that the doc you point to talks about a class as a "view callable". You use the decorator over the class definition. In the bikes app example a different decorator is used on each class method.
I hope reading this part of the docs can help you: http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/viewconfig.html#view-config-placement On Tue, Sep 3, 2013 at 5:49 PM, Chung WONG <[email protected]> wrote: > Hi all, > > in > this<http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/views.html#defining-a-view-callable-as-a-class> > doc, > it said a view callable class *must have* __init__ and __call__ methods, > however, in https://github.com/mcdonc/bikes/blob/master/app7.py , the > view callable classes obviously don't have the __call__ method. > > I am a little bit confused now, is the __call__ method mandatory and what > is the role of it? > > thanks. > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/pylons-discuss. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
