mirror of
				https://github.com/django/daphne.git
				synced 2025-11-04 01:27:33 +03:00 
			
		
		
		
	Fix broken bits in docs.
This commit is contained in:
		
							parent
							
								
									f04dcee7f7
								
							
						
					
					
						commit
						2b486b0ef0
					
				| 
						 | 
					@ -286,7 +286,7 @@ A *channel layer* should provide an object with these attributes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* ``extensions``, a list of unicode string names indicating which
 | 
					* ``extensions``, a list of unicode string names indicating which
 | 
				
			||||||
  extensions this layer provides, or empty if it supports none.
 | 
					  extensions this layer provides, or empty if it supports none.
 | 
				
			||||||
  The only valid extension names are ``groups``, ``flush`` and ``statistics`.
 | 
					  The only valid extension names are ``groups``, ``flush`` and ``statistics``.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
A channel layer implementing the ``groups`` extension must also provide:
 | 
					A channel layer implementing the ``groups`` extension must also provide:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -122,13 +122,13 @@ handler::
 | 
				
			||||||
    def ws_disconnect(message):
 | 
					    def ws_disconnect(message):
 | 
				
			||||||
        Group("chat").discard(message.reply_channel)
 | 
					        Group("chat").discard(message.reply_channel)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.. _websocket-example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Now, that's taken care of adding and removing WebSocket send channels for the
 | 
					Now, that's taken care of adding and removing WebSocket send channels for the
 | 
				
			||||||
``chat`` group; all we need to do now is take care of message sending. For now,
 | 
					``chat`` group; all we need to do now is take care of message sending. For now,
 | 
				
			||||||
we're not going to store a history of messages or anything and just replay
 | 
					we're not going to store a history of messages or anything and just replay
 | 
				
			||||||
any message sent in to all connected clients. Here's all the code::
 | 
					any message sent in to all connected clients. Here's all the code::
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. _websocket-example:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # In consumers.py
 | 
					    # In consumers.py
 | 
				
			||||||
    from channels import Group
 | 
					    from channels import Group
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user