diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2016-04-02 13:18:26 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-04-09 14:54:18 -0400 |
| commit | c1aec0feda73ede09503192a66f973598aef901d (patch) | |
| tree | f1e4c09f3e98177cfe78cc9039b300f8984e7aed /docs/topics/class-based-views | |
| parent | c16b9dd8e0ae757616e9accbaffecc521191ee98 (diff) | |
Fixed #25847 -- Made User.is_(anonymous|authenticated) properties.
Diffstat (limited to 'docs/topics/class-based-views')
| -rw-r--r-- | docs/topics/class-based-views/mixins.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/class-based-views/mixins.txt b/docs/topics/class-based-views/mixins.txt index e53a8599e4..a5bb290d2b 100644 --- a/docs/topics/class-based-views/mixins.txt +++ b/docs/topics/class-based-views/mixins.txt @@ -235,7 +235,7 @@ We'll demonstrate this with the ``Author`` model we used in the model = Author def post(self, request, *args, **kwargs): - if not request.user.is_authenticated(): + if not request.user.is_authenticated: return HttpResponseForbidden() # Look up the author we're interested in. @@ -466,7 +466,7 @@ Our new ``AuthorDetail`` looks like this:: return context def post(self, request, *args, **kwargs): - if not request.user.is_authenticated(): + if not request.user.is_authenticated: return HttpResponseForbidden() self.object = self.get_object() form = self.get_form() @@ -552,7 +552,7 @@ template as ``AuthorDisplay`` is using on ``GET``:: model = Author def post(self, request, *args, **kwargs): - if not request.user.is_authenticated(): + if not request.user.is_authenticated: return HttpResponseForbidden() self.object = self.get_object() return super(AuthorInterest, self).post(request, *args, **kwargs) |
