Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

CBV decorator from view function decorator

The Mixin approach for applying permissions to CBV views has 2 issues:

  1. you need to read the code to see what permissions are being applied to a View
  2. multiple bits of disparate code required to specify, e.g., a simple permission check

Here's an alternative -- takes any function decorator ...

Don't be the product, buy the product!