0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Amended login required mixin documentation to honor **initkwargs.

This commit is contained in:
Simon Charette 2014-03-17 11:58:34 -04:00
parent fad47367bf
commit cc5804bcab

View File

@ -189,8 +189,9 @@ mixin like this::
class LoginRequiredMixin(object):
@classmethod
def as_view(cls):
return login_required(super(LoginRequiredMixin, cls).as_view())
def as_view(cls, **initkwargs):
view = super(LoginRequiredMixin, cls).as_view(**initkwargs)
return login_required(view)
class MyView(LoginRequiredMixin, ...):
# this is a generic view