#32399: Allow method_decorator to handle multiple functions
------------------------------------------+------------------------
Reporter: Alexey Kotenko | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
Allowing `method_decorator` to handle multiple function names would avoid
invoking it multiple times:
{{{#!python
@method_decorator(login_required, name='get')
@method_decorator(login_required, name='post')
class SimpleView(View):
...
}}}
Instead of this lets modify function to polymorpic style:
{{{#!python
@method_decorator(login_required, name=['get', 'post'])
class SimpledView(View):
...
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32399>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.78fb9339ad1a2cf75939bd1a96bbf658%40djangoproject.com.