Reputation: 244
I am a beginner in Django and I am trying to implement chatting in my Django app. I got 3 questions on how to approach this. 1. I see that people recommend to do this using Django Channels but what are the downsides to just using a database? 2. The tutorials on Channels seem to be on how to create a chat room. However I actually want the chat to be not in rooms but rather between users (I am using the default User model btw). Can anyone recommend a tutorial on how to do that? 3. In the official Django documentation JS is used too but I am not too familiar with it. So how much JS do I need to know to implement the chat?
Upvotes: 0
Views: 296
Reputation: 318
The downside of using a database is that you would need to constantly ask the database to see if there is a new message if you're concerned with real-time chat. If it's something like an email where the sent messages are checked by the other user by refreshing page or sending a request, using a database based system would work I think even better.
Upvotes: 1