This project use
- bootstrap for css/js documentation
- PostgreSQL as DataBase
Before you start the project, open the configuration file (main/settings.py) and change the settings for your database.
For example:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'chatdb',
'USER': 'admin',
'PASSWORD': 'admin',
'HOST': 'localhost',
'PORT': '5432',
}
}
And install bootstrap:
pip install django-bootstrap3
To start a chat just run:
python manage.py makemigrations
python manage.py makemigrations users
python manage.py migrate
python manage.py createsuperuser #for create admin
python manage.py runserver
For use this chat you have to do the steps:
- Open the browser at '127.0.0.0:8000'
- Registration two or more users
- Log in as the 1st user
- Select user for dialog
- Write a text message and send it
- Log out
- Log in as the 2nd user
- Open a dialog with the 1st user and write the answer
For the administrator:
- Open the browser at '127.0.0.0:8000/admin'
- Authorize
- Select User for create or delete users
- Select Chat for create or delete dialogs
- Select Message for edit or delete any messages