Gosra is a real-time chat application built using Django and Django Channels, with Redis as a message broker. It supports both private messaging and public chat rooms. The project was created to explore and learn about real-time communication in Django.
- Python
- Django
- Django-channels
- Redis installed and running on your local machine on the port: 6379
Cd to the folder and install the dependencies
cd Gosra
pip install -r requirements.txt
Update settings.py and change channel layers conf
# CHANNEL_LAYERS = {
# "default": {
# "BACKEND": "channels_redis.core.RedisChannelLayer",
# "CONFIG": {
# "hosts": [("localhost", 6379)],
# },
# },
#}
# COMMENT THIS OUT IN settings.py and add the code below this
CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels.layers.InMemoryChannelLayer',
},
}Then run the server
python manage.py runserver
it will run on http://127.0.0.1:8000/