-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Service decorators work with Class Based Views #479
Comments
Side note: BIG GOTCHA to be aware of: I added the auto-wiring of The following construct will cause @resource(collection_path='/items', path='/items/{uuid}')
class Items(BaseResource):
@view(permission='edit')
def get(self):
logging.error("GET")
...
class BaseResource:
def __acl__(self, context=None):
...
def __init__(self, request):
logging.error("BaseResource %r %r ", self, request) # TWO CALLS => 2 INSTANCES!!!
self.request = request
... Output will be the following:
|
can confirm with pattern like:
|
Currently it is impossible to use Cornice decorators on CBV's (except @resource decorator),
This is the feedback I got from pyramid developers on what we can do to improve the situation, leaving here for reference.
The text was updated successfully, but these errors were encountered: