Skip to content
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

Specific decorators #201

Open
BnGx opened this issue Feb 8, 2021 · 0 comments
Open

Specific decorators #201

BnGx opened this issue Feb 8, 2021 · 0 comments

Comments

@BnGx
Copy link

BnGx commented Feb 8, 2021

It would be better to implement method-specific decorators to give more flexibility of use as appropriate by transforming this definition:

class PersonList (ResourceDetail):
     decorators = (cached, login_required)

in the following and more customizable definition:

class PersonList (ResourceDetail):
     decorators = {
         'get': (cached,),
         'post': (login_required,),
     }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant