DEV Community

Cover image for Learn Django through Inventory management system
Suyash Srivastava
Suyash Srivastava

Posted on

3

Learn Django through Inventory management system

About project

Youtube : Project Overview
Github : https://github.com/suyash-srivastava-dev/Inventory-Management

This project aims covers application with Database, models, Views, templates with CRUD functionality.

I have implemented an inventory management system using Django to efficiently manage products, stock levels, suppliers and sales. It supports crud operations for product and suppliers, facilitate stock management and enable tracking of sales order.

I have used django as a backend and for front-end it involves HTML CSS JavaScript with the django template that is jinja. For the database I have used mysql or sqlite. You can below settings for postgres & mysql.

# Postgres
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql', 
        'NAME': 'your_database_name', 
        'USER': 'your_db_user', 
        'PASSWORD': 'your_db_password', 
        'HOST': 'localhost', 
        'PORT': '5432', 
    }
}

# MySQL
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', 
        'NAME': 'your_database_name', 
        'USER': 'your_db_user', 
        'PASSWORD': 'your_db_password', 
        'HOST': 'localhost', 
        'PORT': '3306', 
    }
}
Enter fullscreen mode Exit fullscreen mode

Database model parameters

  • product which consists of name description category price stock quantity and supplier
  • supplier table which contains name email phone number and address
  • sales order that contains product quantity total price sales data and status
  • stock movement that contains product quantity movement type movement date and notes

Models : inventory_management/models.py

Tasks

The application is allows you to add product ,list product, add supplier, list supplier, add stock movements ,create sales order, cancel sales order ,complete sales order, list sales order and stock level check.

Run project

Note: Recommended to use virtual environment for the application.

From Project

  1. Install dependecy : pip install -r requirements.txt
  2. Run the django application : python manage.py runserver
  3. check project on http://localhost:8000/

From Docker

  1. Build the application image : docker-compose build
  2. Create container out of the image: docker-compose up -d
  3. check project on http://localhost:8000/

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Cloudinary image

Video API: manage, encode, and optimize for any device, channel or network condition. Deliver branded video experiences in minutes and get deep engagement insights.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay