This repository contains a Django project with a REST API for user accounts and chat messages, along with database integration and Dockerization. Follow the steps below to set up, configure, and run the application.
- Clone the repository to your local machine.
git clone <repository_url>
cd <project_directory>
- Create and activate a virtual environment.
python -m venv venv
source venv/bin/activate # On Windows, use 'venv\Scripts\activate'
- Install project dependencies.
pip install -r requirements.txt
- Set up the Django project.
python manage.py migrate
- Create a superuser for administration.
python manage.py createsuperuser.
- Run the development server.
python manage.py runserver
- Access the Django admin panel at http://127.0.0.1:8000/admin/ and log in with the superuser credentials.
Explore the following API endpoints:
- User Registration: POST /register/
- User Login: POST /login/
- User Logout: POST /logout/
- Send Chat Message: POST /send-chat-message/
- Get Chat History: GET /get-chat-history/
<receiver_username>
/
-
Make sure Docker and Docker Compose on your machine.
-
Once docker is running, access the application at
http://127.0.0.1:8000/
.