Saisissez lfrom datetime import datetimee code ici...e code ici...Saisissez le code ici.
@database_sync_to_async
def get_all_message(self):
return Message.objects.all()..
put in the end of classe ChatConsumer according to your code after def chat_message.
if is ok,
go to add the following code after self.accept():
change self.accept() to await self.accept()
| |||||||||||||||||||