diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-02-04 13:02:41 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-02-04 13:02:41 +0000 |
| commit | 98e0d06a77fef4cec0266510f2d02975ce56c405 (patch) | |
| tree | 3e59622fe467bc2ac4019c95c956f8ed43ce892c /repoze/bfg/tests/restbugapp/views.py | |
| parent | cb968d991b5466286aa3d53af20d405c3c48a17c (diff) | |
| download | pyramid-98e0d06a77fef4cec0266510f2d02975ce56c405.tar.gz pyramid-98e0d06a77fef4cec0266510f2d02975ce56c405.tar.bz2 pyramid-98e0d06a77fef4cec0266510f2d02975ce56c405.zip | |
- 1.2b4 introduced a bug whereby views added via a route configuration
that named a view callable and also a ``view_attr`` became broken.
Symptom: ``MyViewClass is not callable`` or the ``__call__`` of a
class was being called instead of the method named via
``view_attr``.
Diffstat (limited to 'repoze/bfg/tests/restbugapp/views.py')
| -rw-r--r-- | repoze/bfg/tests/restbugapp/views.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/repoze/bfg/tests/restbugapp/views.py b/repoze/bfg/tests/restbugapp/views.py new file mode 100644 index 000000000..eb6a6591d --- /dev/null +++ b/repoze/bfg/tests/restbugapp/views.py @@ -0,0 +1,18 @@ +from webob import Response + +class BaseRESTView(object): + def __init__(self, context, request): + self.context = context + self.request = request + +class PetRESTView(BaseRESTView): + """ REST Controller to control action of an avatar """ + def __init__(self, context, request): + super(PetRESTView, self).__init__(context, request) + + def GET(self): + return Response('gotten') + + def POST(self): + return Response('posted') + |
