PŁeasure REST API is the backend service for the PŁeasure application, built using Django. This API facilitates interactions with the PostgreSQL database, which is containerized using Docker for seamless development and deployment.
- Django Framework: Utilizes Django for robust and scalable backend development.
- RESTful API: Provides RESTful endpoints for easy integration with front-end applications.
- PostgreSQL Database: Uses PostgreSQL for reliable and efficient data management.
- Docker Integration: Fully containerized environment using Docker for simplified setup and deployment.
- Django: Backend framework
- Django REST Framework: Toolkit for building Web APIs
- PostgreSQL: Relational database
- Docker: Containerization platform
- Docker
- Docker Compose
- Python 3.x
- pip
-
Clone the repository:
git clone https://github.com/your-username/pleasure-rest-api.git cd pleasure-rest-api
-
Install dependencies:
pip install -r requirements.txt
-
Setup Docker containers:
docker build .
docker-compose up
-
Run migrations:
docker-compose run --rm app sh -c "python manage.py makemigrations && python manage.py migrate"
-
Create a superuser:
docker-compose run --rm app sh -c "python manage.py createsuperuser"
After running the setup, you can access and test the API endpoints
after creating a superuser at http://localhost:8000/api/docs
.
Here is a list of the available endpoints: