#24914: Include a LoginRequiredMixin to Django
------------------------------+------------------------------------
Reporter: raphaelm | Owner: raphaelm
Type: New feature | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by ana-balica):
* stage: Unreviewed => Accepted
Comment:
It is a good idea to provide a `LoginRequiredMixin`, which basically will
act the same way as the `login_required` decorator. It might be
implemented in a cleaner way by decorating `dispatch` method (in contrast
with decorating `as_view` classmethod).
I would opt for getting started with `LoginRequiredMixin` and afterwards
providing mixins for `user_passes_test` and `permission_required` from
`django.contrib.auth.decorators`.
https://docs.djangoproject.com/en/dev/_modules/django/contrib/auth/decorators/
--
Ticket URL: <https://code.djangoproject.com/ticket/24914#comment:4>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.d66c15b077471520b0d17f9184ec12bc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.