Skip to content

Commit f7cd029

Browse files
author
github-actions
committed
Deployed c80f94d to develop with MkDocs 1.5.3 and mike 2.0.0
1 parent 2aeca48 commit f7cd029

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

develop/about/changelog/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

develop/reference/hooks/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@
827827

828828
<span class=k>return</span> <span class=n>html</span><span class=o>.</span><span class=n>div</span><span class=p>(</span><span class=sa>f</span><span class=s2>&quot;Message Receiver: </span><span class=si>{</span><span class=n>message</span><span class=si>}</span><span class=s2>&quot;</span><span class=p>)</span>
829829
</code></pre></div></td></tr></table></div> </div> </div> </div> <details class=example> <summary>See Interface</summary> <p><font size=4><strong>Parameters</strong></font></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> </thead> <tbody> <tr> <td><code class=highlight><span class=n>name</span></code></td> <td><code class=highlight><span class=nb>str</span> <span class=o>|</span> <span class=kc>None</span></code></td> <td>The name of the channel to subscribe to. If you define a <code class=highlight><span class=n>group_name</span></code>, you can keep <code class=highlight><span class=n>name</span></code> undefined to auto-generate a unique name.</td> <td><code class=highlight><span class=kc>None</span></code></td> </tr> <tr> <td><code class=highlight><span class=n>group_name</span></code></td> <td><code class=highlight><span class=nb>str</span> <span class=o>|</span> <span class=kc>None</span></code></td> <td>If configured, any messages sent within this hook will be broadcasted to all channels in this group.</td> <td><code class=highlight><span class=kc>None</span></code></td> </tr> <tr> <td><code class=highlight><span class=n>group_add</span></code></td> <td><code class=highlight><span class=nb>bool</span></code></td> <td>If <code class=highlight><span class=kc>True</span></code>, the channel will automatically be added to the group when the component mounts.</td> <td><code class=highlight><span class=kc>True</span></code></td> </tr> <tr> <td><code class=highlight><span class=n>group_discard</span></code></td> <td><code class=highlight><span class=nb>bool</span></code></td> <td>If <code class=highlight><span class=kc>True</span></code>, the channel will automatically be removed from the group when the component dismounts.</td> <td><code class=highlight><span class=kc>True</span></code></td> </tr> <tr> <td><code class=highlight><span class=n>receiver</span></code></td> <td><code class=highlight><span class=n>AsyncMessageReceiver</span> <span class=o>|</span> <span class=kc>None</span></code></td> <td>An async function that receives a <code class=highlight><span class=n>message</span><span class=p>:</span> <span class=nb>dict</span></code> from a channel. If more than one receiver waits on the same channel name, a random receiver will get the result.</td> <td><code class=highlight><span class=kc>None</span></code></td> </tr> <tr> <td><code class=highlight><span class=n>layer</span></code></td> <td><code class=highlight><span class=nb>str</span></code></td> <td>The channel layer to use. This layer must be defined in <code class=highlight><span class=n>settings</span><span class=o>.</span><span class=n>py</span><span class=p>:</span><span class=n>CHANNEL_LAYERS</span></code>.</td> <td><code class=highlight><span class=s1>&#39;default&#39;</span></code></td> </tr> </tbody> </table> <p><font size=4><strong>Returns</strong></font></p> <table> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code class=highlight><span class=n>AsyncMessageSender</span></code></td> <td>An async callable that can send a <code class=highlight><span class=n>message</span><span class=p>:</span> <span class=nb>dict</span></code>.</td> </tr> </tbody> </table> </details> <details class=warning> <summary>Extra Django configuration required</summary> <p>In order to use this hook, you will need to configure Django to enable channel layers.</p> <p>The <a href=https://channels.readthedocs.io/en/latest/topics/channel_layers.html#configuration>Django Channels documentation</a> has information on what steps you need to take.</p> <p>In summary, you will need to:</p> <ol> <li> <p>Install <a href=https://redis.io/download/ ><code>redis</code></a> on your machine.</p> </li> <li> <p>Run the following command to install <code>channels-redis</code> in your Python environment.</p> <div class=highlight><pre><span></span><code>pip<span class=w> </span>install<span class=w> </span>channels-redis
830-
</code></pre></div> </li> <li> <p>Configure your <code>settings.py</code> to use <code>RedisChannelLayer</code> as your layer backend.</p> <div class=highlight><pre><span></span><code><span class=n>CHANNEL_LAYERS</span> <span class=o>=</span> <span class=p>{</span>
830+
</code></pre></div> </li> <li> <p>Configure your <code>settings.py</code> to use <code class=highlight><span class=n>RedisChannelLayer</span></code> as your layer backend.</p> <div class=highlight><pre><span></span><code><span class=n>CHANNEL_LAYERS</span> <span class=o>=</span> <span class=p>{</span>
831831
<span class=s2>&quot;default&quot;</span><span class=p>:</span> <span class=p>{</span>
832832
<span class=s2>&quot;BACKEND&quot;</span><span class=p>:</span> <span class=s2>&quot;channels_redis.core.RedisChannelLayer&quot;</span><span class=p>,</span>
833833
<span class=s2>&quot;CONFIG&quot;</span><span class=p>:</span> <span class=p>{</span>

0 commit comments

Comments
 (0)