The docs are covering things from different perspectives but it's not
entirely obvious. I think the view_config docs are more clear about
class-based views that the part you linked.

http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/viewconfig.html#adding-view-configuration-using-the-view-config-decorator


On Tue, Sep 3, 2013 at 9:30 PM, Jonathan Vanasco <[email protected]>wrote:

> This looks to be a problem with the docs -- which are being rewritten.
>
> View Callables can be set up at least 3 ways (more?)- that page only
> explains 2.
>
> 1. Functions
>
>     def hello_world(request):
>         return Response("Hello, World")
>
> 2. Classes
>
>     class HelloWorld(object):
>          def __init__(self,request):
>               self.request = request
>          def __call__(self):
>               return Response("Hello, World")
>
> 3. Object Methods ( class based views )
>
>     class Foo(object):
>          def __init__(self,request):
>               self.request = request
>
>          def hello_world(self):
>               return Response("Hello, World")
>
>
>
>  --
> 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.

Reply via email to