mirror of
https://github.com/django/django.git
synced 2025-04-16 13:24:38 +00:00
[1.8.x] Fixed user_passes_test() signature in docs.
Backport of ec708803f70d51dda21845799de8c62d02611808 from master
This commit is contained in:
parent
cdc354eb39
commit
d34de856e5
@ -513,7 +513,7 @@ redirects to the login page::
|
||||
return redirect('/login/?next=%s' % request.path)
|
||||
# ...
|
||||
|
||||
.. function:: user_passes_test(func, login_url=None, redirect_field_name='next')
|
||||
.. function:: user_passes_test(test_func, login_url=None, redirect_field_name='next')
|
||||
|
||||
As a shortcut, you can use the convenient ``user_passes_test`` decorator
|
||||
which performs a redirect when the callable returns ``False``::
|
||||
|
Loading…
x
Reference in New Issue
Block a user