擅长:python、mysql、java
<p>您可以看到<a href="https://github.com/django/channels/blob/1.x/channels/message.py" rel="nofollow noreferrer">here</a>,<code>Message</code>类中没有定义{<cd2>}方法。在</p>
<p>如果要获取消息内容,可以访问<code>Message</code>实例的<code>.content</code>属性来获取<code>Message</code>内容{<cd6>}。(这在<code>Message</code>类文档字符串中提到)</p>
<p><strong>修复</strong>:</p>
<pre><code>Group('chat-'+label).send({'text': json.dumps(m.content)})
</code></pre>