Skip to content

HiepThanhTran/Backend-TPMS

Repository files navigation

Training Point Management

Welcome to the Training Point Management Web API repository! This project is designed to provide a comprehensive backend solution for managing and tracking training points for students. Developed using Django, this Web API offers a robust framework for handling user authentication, data management, and real-time interactions with the frontend application, which is built using React Native.

Installation

  1. Clone the project
git clone https://github.com/HiepThanhTran/TPM-API.git
cd TPM-API
  1. Create venv for this project
python3 -m venv .venv
source .venv/bin/activate
  1. Download packages in requirements.txt file
pip install -r requirements.txt
  1. Environment Variables

    • Create a .env file in the root directory and add the following:
 CLOUDINARY_API_KEY=your-cloudinary-api-key
 CLOUDINARY_API_SECRET=your-cloudinary-api-secret
 CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name
 POSTGRES_DATABASE=your-postgres-database
 POSTGRES_HOST=your-postgres-host
 POSTGRES_PASSWORD=your-postgres-password
 POSTGRES_PRISMA_URL=your-postgres-prisma-url
 POSTGRES_URL=your-postgres-url
 POSTGRES_URL_NON_POOLING=your-postgres-url-non-pooling
 POSTGRES_URL_NO_SSL=your-postgres-url-no-ssl
 POSTGRES_USER=your-postgres-user
 SECRET_KEY=your-postgres-secret-key
  1. Create mysql database in your computer or use your database

  2. Change name, user, password of DATABASES variable in core/settings.py

  3. Run makemigrations and migrate

python3 manage.py makemigrations
python3 manage.py migrate
  1. Run a data collection if you want sample data (This may take a while)
python3 manage.py collectdata
  • This command will create a superuser with:

  • Note: Create superuser if you don't run collectdata command

python3 manage.py createsuperuser
  1. Run project
python3 manage.py runserver

About

Backend for Training Point Management System Mobile App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published