Amended login required mixin documentation to honor **initkwargs.
This commit is contained in:
parent
fad47367bf
commit
cc5804bcab
|
@ -189,8 +189,9 @@ mixin like this::
|
||||||
|
|
||||||
class LoginRequiredMixin(object):
|
class LoginRequiredMixin(object):
|
||||||
@classmethod
|
@classmethod
|
||||||
def as_view(cls):
|
def as_view(cls, **initkwargs):
|
||||||
return login_required(super(LoginRequiredMixin, cls).as_view())
|
view = super(LoginRequiredMixin, cls).as_view(**initkwargs)
|
||||||
|
return login_required(view)
|
||||||
|
|
||||||
class MyView(LoginRequiredMixin, ...):
|
class MyView(LoginRequiredMixin, ...):
|
||||||
# this is a generic view
|
# this is a generic view
|
||||||
|
|
Loading…
Reference in New Issue