Fix generics docs

This commit is contained in:
Andrew Godwin 2016-09-11 11:00:45 +01:00
parent 5e0add6bbb
commit 9618440e6d

View File

@ -224,15 +224,15 @@ This will run the appropriate decorator around your handler methods, and provide
the one passed in to your handler as an argument as well as ``self.message``,
as they point to the same instance.
And if you just want to use same old django session just use ``http_session`` or
``http_session_user``::
And if you just want to use the user from the django session, add ``http_user``:
class MyConsumer(WebsocketConsumer):
http_session_user = True
http_user = True
This will give you ``message.user``, which will be the same as ``request.user``
would be on a regular View.
That gives you ``message.user`` which is same as ``request.user`` and ``message.http_session``
is same as of ``request.session``
Applying Decorators
-------------------