1 2 3 4 5 6 | def action(views):
def _dec(request, *args, **kwargs):
action = kwargs['action']
del kwargs['action']
return getattr(views, action)(request, *args, **kwargs)
return _dec
|
More like this
- Using class methods as views by panyam 2 years, 7 months ago
- load m2m fields objects by dirol 1 year, 8 months ago
- Owner required decorator by polarbear 3 years, 7 months ago
- Add multiple parameters to the current url by cschand 3 years, 7 months ago
- ID in request GET or POST required decorator by markeyev 1 year, 5 months ago
Comments