mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Fixed #25847 -- Made User.is_(anonymous|authenticated) properties.
This commit is contained in:
parent
c16b9dd8e0
commit
c1aec0feda
27 changed files with 238 additions and 93 deletions
|
|
@ -45,7 +45,7 @@ class LazyRedirectView(RedirectView):
|
|||
url = reverse_lazy('named-lazy-url-redirected-to')
|
||||
|
||||
|
||||
@user_passes_test(lambda u: u.is_authenticated(), login_url=reverse_lazy('some-login-page'))
|
||||
@user_passes_test(lambda u: u.is_authenticated, login_url=reverse_lazy('some-login-page'))
|
||||
def login_required_view(request):
|
||||
return HttpResponse('Hello you')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue