File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ There are two available implementations:
19
19
20
20
Both layers support a single-server and sharded configurations.
21
21
22
+ Installation
23
+ ------------
24
+
25
+ .. code-block ::
26
+
27
+ pip install channels-redis
28
+
22
29
**Note: ** Prior versions of this package were called ``asgi_redis `` and are
23
30
still available under PyPI as that name if you need them for Channels 1.x projects.
24
31
This package is for Channels 2 projects only.
29
36
30
37
Set up the channel layer in your Django settings file like so::
31
38
39
+ .. code-block :: python
40
+
32
41
CHANNEL_LAYERS = {
33
42
" default" : {
34
43
" BACKEND" : " channels_redis.core.RedisChannelLayer" ,
@@ -40,6 +49,8 @@ Set up the channel layer in your Django settings file like so::
40
49
41
50
Or, you can use the alternate implementation which uses Redis Pub/Sub::
42
51
52
+ .. code-block :: python
53
+
43
54
CHANNEL_LAYERS = {
44
55
" default" : {
45
56
" BACKEND" : " channels_redis.pubsub.RedisPubSubChannelLayer" ,
You can’t perform that action at this time.
0 commit comments