module documentation
Functions that help with dynamically creating decorators for views.
Class | classonlymethod |
Undocumented |
Function | async |
Mark a middleware factory as returning an async middleware. |
Function | decorator |
Given a middleware class (not an instance), return a view decorator. This lets you use middleware functionality on a per-view basis. The middleware is created with no params passed. |
Function | decorator |
Like decorator_from_middleware, but return a function that accepts the arguments to be passed to the middleware_class. Use like:: |
Function | make |
Undocumented |
Function | method |
Convert a function decorator into a method decorator |
Function | sync |
Mark a middleware factory as returning a hybrid middleware supporting both types of request. |
Function | sync |
Mark a middleware factory as returning a sync middleware. This is the default. |
Function | _multi |
Decorate `method` with one or more function decorators. `decorators` can be a single decorator or an iterable of decorators. |
Function | _update |
Undocumented |
Given a middleware class (not an instance), return a view decorator. This lets you use middleware functionality on a per-view basis. The middleware is created with no params passed.
Like decorator_from_middleware, but return a function that accepts the arguments to be passed to the middleware_class. Use like:: cache_page = decorator_from_middleware_with_args(CacheMiddleware) # ... @cache_page(3600) def my_view(request): # ...