mirror of
https://github.com/django/daphne.git
synced 2025-04-20 08:42:18 +03:00
sessions and users doc updated (#354)
This commit is contained in:
parent
b46c511b13
commit
5e0add6bbb
|
@ -224,6 +224,16 @@ 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``::
|
||||
|
||||
class MyConsumer(WebsocketConsumer):
|
||||
|
||||
http_session_user = True
|
||||
|
||||
That gives you ``message.user`` which is same as ``request.user`` and ``message.http_session``
|
||||
is same as of ``request.session``
|
||||
|
||||
Applying Decorators
|
||||
-------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user