Skip to content

Ctrim backend with Django-rest. Ctrim is a business management platform. You can keep track of products, profits, employees and collaborate with other business owners.

License

Notifications You must be signed in to change notification settings

kwanj-k/ctrim-api

Repository files navigation

Build Status Coverage Status

Getting started

These instructions will get you a copy of the project up and running in your local machine for development and testing purposes.

Prerequisites

Installing

Setting up the database

  • Start your database server and create your database

Setting up and Activating a Virtual Environment

  • Create a working space in your local machine
  • Clone this repository git clone https://github.com/kwanj-k/ctrim-api.git
  • Navigate to the project directory
  • Create a virtual environment python3 -m venv name_of_your_virtual_environment
  • Create a .env file and put these key=values in it:
source name_of_your_virtual_environment/bin/activate
source venv/bin/activate
export DB_NAME="your_db_name"
export DB_USER="your_postgres_username"
export DB_PASS="your_postgres_password"
export DB_HOST="localhost or any other host name"
export DB_PORT="port_number"
  • Load the environment variable source .env
  • Install dependencies to your virtual environment pip install -r requirements.txt
  • Migrate changes to the newly created database python manage.py makemigrations then python manage.py migrate

Starting the server

  • Ensure you are in the project directory on the same level with manage.py and the virtual environment is activated
  • Run the server python manage.py runserver

Run Tests

-Run your tests pytest --cov-report term-missing --cov=apps -p no:warnings

API Spec

About

Ctrim backend with Django-rest. Ctrim is a business management platform. You can keep track of products, profits, employees and collaborate with other business owners.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages