This project demonstrate django one to one chat with authentication using django channels 3 and redis.
How to run
- Clone the repo
- Run requirements.txt
- Install redis on your windows if not installed and restart
- Change database configuration to your database
- Migrate the database
- Run on local server
How to add chat function on your project
- Run requirements.txt
- Create a chat app
- Copy consumer.py, routing.py, templates, views, urls and models from this project.
- Copy the configuration in asgi file
- Change the settings:
- Add channels and chat in installed apps
- Set ASGI_APPLICATION = 'yourproject.asgi.application'
- Set Channel Layers in the settings
- Migrate and run the project and you can access the chat feature on the provided url
For more information visit https://channels.readthedocs.io/en/stable/
PS: You will need to add Heroku-redis add-on on your heroku app to run the application