This repository contains the backend API for the web application "Blood UI". The API is built using Django REST Framework (DRF). The API has been deployed to PythonAnywhere and is accessible at lordgrim18.pythonanywhere.com.
- CRUD operations: Create, Read, Update, and Delete functionalities for various web application's data models.
- Authentication: Implement user authentication using mechanisms like JWT.
- Permissions: Control access to API endpoints based on user roles or permissions.
- Bulk operations: Perform bulk operations on data models. For example, bulk create.
- API documentation: Provide API documentation for developers to understand the API endpoints and their functionalities.
- Deployment: Deploy the API to a cloud platform for public access.
- Python 3.x
- Clone this repository.
git clone https://github.com/Blood-Ui/bloody-back.git
- Create a virtual environment and activate it.
python -m venv venv
venv/bin/activate
- Install dependencies.
pip install -r requirements.txt
- Copy .env.sample to .env and update the configuration values.
- Update .env file with your database configuration, secret keys, and other project-specific details.
Initial Setup:
-
Run
python manage.py makemigrations
to generate migration files for your data models. -
Run
python manage.py migrate
to create database tables based on the migrations.
Note: Currently, Django's default migration commands are used. We plan to implement custom migrations in the future for greater control over the database schema.
Development Server:
- Run
python manage.py runserver
to start the development server. - The API will be accessible at http://127.0.0.1:8000/ by default (port may vary).
Deployed API:
- Access the deployed API at lordgrim18.pythonanywhere.com.
Contact the project maintainers to obtain the API documentation. A Postman collection will be provided for testing the API endpoints.
We welcome contributions to this project! Please contact the maintainers for further details.