Stock Management System Project in Django with Source Code

Stock Management System Project in Django with Source Code

This Stock Management System Project in Django created based on python, Django, and SQLITE3 Database.

This project is ideal for measuring your business, and it is appropriate for any form of business that sells products rather than services.

This system generates a detailed list of all reviews written by the administrator.

A corporation or business may use the system to track their products/stocks, sales transactions, and other related transactions.

Reports such as the Sales Report, Return of Goods Report, and others are produced by this project.

To start creating a Stock Management System Project in Python Django, makes sure that you have PyCharm Professional IDE Installed in your computer.

This Stock Management System Project in Django Framework, Also includes a Download Source Code for free, just find the downloadable source code below and click download now.

About ProjectProject DetailsDefinition
Project Name Stock Management System Project in DjangoThe Stock Management System Project in Django is an easy project for beginners to learn how to build a web-based python Django project. We will provide you with the complete source code and database for the python project so that you can easily install it on your machine and learn how to program in Python Django.
Python version (Recommended)3.8 VersionPython 3.8 introduces some new syntax to the language, as well as a few small modifications to existing behavior and, most importantly, a slew of performance improvements, following in the footsteps of the previous 3.7 version.
Programming Language UsedPython Django LanguageDjango is a high-level Python web framework for building safe and maintainable websites quickly. Django is a web framework built by experienced developers that takes care of a lot of the heavy lifting so you can focus on developing your app instead of reinventing the wheel.
Developer Name itsourcecode.comFree projects containing source code in Java, PHP, Python, Django, VB.Net, Visual Basic, C, C++, C#, Javascript, and other languages are available on this website.
IDE Tool (Recommended)Sublime, Visual Studio, PyCharmSublime Text is a source code editor that is available for purchase. It comes with built-in support for a variety of programming and markup languages. Plugins, which are often community-built and maintained under free-software licenses, allow users to extend the functionality of the system. Sublime Text has a Python API to help with plugins.
Project Type Web ApplicationA web application, unlike computer-based software programs that operate locally on the device’s operating system, is application software that runs on a web server. The user uses a web browser with an active network connection to access web apps.
DatabaseSQLiteSQLite is a programming language that is used to create embedded software for devices such as televisions, cell phones, and cameras. It can handle HTTP requests with low to medium traffic. SQLite has the ability to compress files into smaller bundles with less metadata. SQLite is a temporary dataset that is used within an application to process data.
Stock Management System Project in Django Overview

Admin Features of Stock Management System Project in Django

  • Login Page The page where the system administrator enters their system credentials in order to gain access to the system’s administrative side.
  • Manage Product – This is the page where an administrator can add, update, and delete product information.
  • Manage Brand – This is the page where an administrator can add, update, and delete brand information.
  • Categories Management – This is the page where an administrator can add, update, and categories information.
  • Manage Order– This is the page where an administrator can add, update, view order and delete order information.
  • Manage Report – The page where admin can view the daily sales report.

Stock Management System Project in Django Steps on How to Create a Project

Time needed: 5 minutes

Here’s the step’s on how to create a Stock Management System Project in Django with Source Code.

  • Step 1: Open file.

    First , open “pycharm professional” after that click “file” and click “new project“.
    Create new Project for Billing System Project in Django with Source Code

  • Step 2: Choose Django.

    Next, after click “new project“, choose “Django” and click.
    choose django for Create new Project for Billing System Project in Django with Source Code

  • Step 3: Select file location.

    Then, select a file location wherever you want.
    Create location name for Stock Management System Project in Django with Source Code

  • Step 4: Create application name.

    After that, name your application.

  • Step 5: Click create.

    Lastly, finish creating project by clicking “create” button.
    FInish Creating Project name for Stock Management System Project in Django with Source Code

  • Step 6: Start Coding.

    Finally, we will now start adding functionality to our Django Framework by adding some functional codes.

Functionality and Codes of the Stock Management System Project in Django

  • Create template for the navigation bar in Stock Management System Project Project in Django.

In this section, we will learn on how create a templates for the navigation bar. To start with, add the following code in your navbar.html under the folder of /templates/modules.

 <nav class="navbar navbar-toggleable-lg" style="background-color: black; box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0.2), 0 2px 20px 0 rgba(0, 0, 0, 0.19)">
            <a class="navbar-brand" href="{% url 'index' %}">STOCK MANAGEEMNT SYSTEM</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                    aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="nav navbar-nav ml-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'dashboard' %}"><i class="fa fa-list-alt" aria-hidden="true"></i> Dashboard</a>
                    </li>
                    <li class="nav-item" id="navBrand">
                        <a class="nav-link" href="{% url 'products' %}"><i class="fa fa-gamepad" aria-hidden="true"></i></i> Products</a>
                    </li>
                    <li class="nav-item" id="navBrand">
                        <a class="nav-link" href="{% url 'brand' %}"><i class="fa fa-envira" aria-hidden="true"></i> Brands</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'categories' %}"><i class="fa fa-list" aria-hidden="true"></i> Categories</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'orders' %}"><i class="fa fa-cubes" aria-hidden="true"></i></i> Orders</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'report' %}"><i class="fa fa-line-chart" aria-hidden="true"></i></i> Report</a>
                    </li>
                </ul>
                {% if user.is_authenticated %}
                <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
                           data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                               <i class="fa fa-user" aria-hidden="true"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-menu-right">
                            <div class="dropdown-item" style="color: cornflowerblue">{{ user|capfirst }}</div>
                            <a class="dropdown-item" href="#">Settings</a>
                            <a class="dropdown-item" href="{% url 'logout' %}">Logout</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="#">Something else here</a>
                        </ul>
                    </li>
                </ul>
                {% endif %}

            </div>
        </nav>

  • Create template for the order in Stock Management System Project Project in Django.

In this section, we will learn on how create a templates for the order. To start with, add the following code in your order.html under the folder of /templates/modules.

{% extends 'modules/base.html' %}
{% load static %}

{% block content %}
    <div class="container">
        <div class="row vertical">
            <div class="col-sm-12">
                <div class="breadcrumb">
                    <p><a href="{% url 'index' %}">Home</a> / Orders </p>
                </div>
                <div class="card card-outline-secondary">
                    <div class="card-header">
                        <h3 class="mb-0 text-center">Manage Orders</h3>
                    </div>
                    <div class="card-block">
                        <form class="form form-horizontal" method="post" action="" id="createOrderForm">

                            <div class="form-group">
                                <label for="orderDate" class="col-sm-2 control-label">Order Date</label>
                                <div class="col-sm-12">
                                    <input type="text" class="form-control" id="orderDate" name="orderDate"
                                           autocomplete="off"/>
                                </div>
                            </div> <!--/form-group-->


                            <div class="form-group">
                                <label for="clientName" class="col-sm-2 control-label">Client Name</label>
                                <div class="col-sm-12">
                                    <input type="text" class="form-control" id="clientName" name="clientName"
                                           placeholder="Client Name" autocomplete="off"/>
                                </div>
                            </div> <!--/form-group-->
                            <div class="form-group">
                                <label for="clientContact" class="col-sm-2 control-label">Client Contact</label>
                                <div class="col-sm-12">
                                    <input type="text" class="form-control" id="clientContact" name="clientContact"
                                           placeholder="Contact Number" autocomplete="off"/>
                                </div>
                            </div>

                            <table class="table" id="productTable">
                                <thead>
                                    <tr>
                                        <th width="30%">Product</th>
                                        <th width>Rate</th>
                                        <th width="15%">Quantity</th>
                                        <th width="20%">Total</th>
                                        <th></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr id="" class="">
                                        <td>
                                            <div class="form-group">

                                                <select class="form-control" name="productName[]"
                                                        id="productName<?php echo $x; ?>"
                                                        onchange="">
                                                    <option value="">SELECT</option>
                                                </select>
                                            </div>
                                        </td>
                                        <td>
                                            <input type="text" name="rate[]" id="rate<?php echo $x; ?>"
                                                   autocomplete="off"
                                                   disabled="true" class="form-control"/>
                                            <input type="hidden" name="rateValue[]" id="rateValue<?php echo $x; ?>"
                                                   autocomplete="off" class="form-control"/>
                                        </td>
                                        <td>
                                            <div class="form-group">
                                                <input type="number" name="quantity[]" id="quantity<?php echo $x; ?>"
                                                       onkeyup="" autocomplete="off"
                                                       class="form-control" min="1"/>
                                            </div>
                                        </td>
                                        <td>
                                            <input type="text" name="total[]" id="total<?php echo $x; ?>"
                                                   autocomplete="off"
                                                   class="form-control" disabled="true"/>
                                            <input type="hidden" name="totalValue[]" id="totalValue<?php echo $x; ?>"
                                                   autocomplete="off" class="form-control"/>
                                        </td>
                                        <td>

                                            <button class="btn btn-default removeProductRowBtn" type="button"
                                                    id="removeProductRowBtn" onclick="">
                                                <i class="fa fa-trash" aria-hidden="true"></i></button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>


                            <div class="container">
                                <div class="row">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label for="subTotal" class="col-sm-6 control-label">Sub Amount</label>
                                            <div class="col-sm-9">
                                                <input type="text" class="form-control" id="subTotal" name="subTotal"
                                                       disabled="true"/>
                                                <input type="hidden" class="form-control" id="subTotalValue"
                                                       name="subTotalValue"/>
                                            </div>
                                        </div> <!--/form-group-->
                                        <div class="form-group">
                                            <label for="vat" class="col-sm-6 control-label">VAT 13%</label>
                                            <div class="col-sm-9">
                                                <input type="text" class="form-control" id="vat" name="vat"
                                                       disabled="true"/>
                                                <input type="hidden" class="form-control" id="vatValue"
                                                       name="vatValue"/>
                                            </div>
                                        </div> <!--/form-group-->
                                        <div class="form-group">
                                            <label for="totalAmount" class="col-sm-6 control-label">Total Amount</label>
                                            <div class="col-sm-9">
                                                <input type="text" class="form-control" id="totalAmount"
                                                       name="totalAmount" disabled="true"/>
                                                <input type="hidden" class="form-control" id="totalAmountValue"
                                                       name="totalAmountValue"/>
                                            </div>
                                        </div> <!--/form-group-->
                                        <div class="form-group">
                                            <label for="discount" class="col-sm-6 control-label">Discount</label>
                                            <div class="col-sm-9">
                                                <input type="text" class="form-control" id="discount" name="discount"
                                                       onkeyup="discountFunc()" autocomplete="off"/>
                                            </div>
                                        </div> <!--/form-group-->
                                        <div class="form-group">
                                            <label for="grandTotal" class="col-sm-6 control-label">Grand Total</label>
                                            <div class="col-sm-9">
                                                <input type="text" class="form-control" id="grandTotal"
                                                       name="grandTotal" disabled="true"/>
                                                <input type="hidden" class="form-control" id="grandTotalValue"
                                                       name="grandTotalValue"/>
                                            </div>
                                        </div> <!--/form-group-->
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label for="paid" class="col-sm-6 control-label">Paid Amount</label>
                                            <div class="col-sm-9">
                                                <input type="text" class="form-control" id="paid" name="paid"
                                                       autocomplete="off" onkeyup="paidAmount()"/>
                                            </div>
                                        </div> <!--/form-group-->
                                        <div class="form-group">
                                            <label for="due" class="col-sm-6 control-label">Due Amount</label>
                                            <div class="col-sm-9">
                                                <input type="text" class="form-control" id="due" name="due"
                                                       disabled="true"/>
                                                <input type="hidden" class="form-control" id="dueValue"
                                                       name="dueValue"/>
                                            </div>
                                        </div> <!--/form-group-->
                                        <div class="form-group">
                                            <label for="clientContact" class="col-sm-6 control-label">Payment
                                                                                                      Type</label>
                                            <div class="col-sm-9">
                                                <select class="form-control" name="paymentType" id="paymentType">
                                                    <option value="">SELECT</option>
                                                    <option value="1">Cheque</option>
                                                    <option value="2">Cash</option>
                                                    <option value="3">Credit Card</option>
                                                </select>
                                            </div>
                                        </div> <!--/form-group-->
                                        <div class="form-group">
                                            <label for="clientContact" class="col-sm-6 control-label">Payment
                                                                                                      Status</label>
                                            <div class="col-sm-9">
                                                <select class="form-control" name="paymentStatus" id="paymentStatus">
                                                    <option value="">SELECT</option>
                                                    <option value="1">Full Payment</option>
                                                    <option value="2">Advance Payment</option>
                                                    <option value="3">No Payment</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="form-group submitButtonFooter" style="margin-top: 50px">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <button type="button" class="btn btn-default" onclick="addRow()"
                                                        id="addRowBtn" data-loading-text="Loading..."><i
                                                        class="glyphicon glyphicon-plus-sign"></i> Add Row
                                                </button>

                                                <button type="submit" id="createOrderBtn" data-loading-text="Loading..."
                                                        class="btn btn-success"><i
                                                        class="glyphicon glyphicon-ok-sign"></i> Save Changes
                                                </button>

                                                <button type="reset" class="btn btn-default" onclick="resetOrderForm()">
                                                    <i class="glyphicon glyphicon-erase"></i> Reset
                                                </button>
                                            </div>
                                        </div>

                                    </div>
                                </div>
                            </div>

                        </form>

                    </div>
                    <!--/card-block-->
                </div>
            </div>
        </div>


    </div>
{% endblock %}

{% block script %}
    <script src="{% static 'js/order.js' %}"></script>
{% endblock %}

  • Create template for the brand in Stock Management System Project Project in Django.

In this section, we will learn on how create a templates for the brand. To start with, add the following code in your brand.html under the folder of /templates/module.

{% extends 'modules/base.html' %}
{% load static %}

{% block content %}
    <div class="container">
        <div class="row vertical">
            <div class="col-md-12 center-block">
                <div class="breadcrumb">
                    <p><a href="{% url 'index' %}">Home</a> / Brands </p>
                </div>
                <div class="card card-outline-secondary">
                    <div class="card-header">
                        <h3 class="mb-0 text-center">Manage Brand</h3>
                    </div>
                    <div class="card-block">
                        <button class="btn btn-default float-right" style="margin-bottom: 20px" data-toggle="modal"
                                data-target="#addBrandModal" id="btn-add" data-url="{% url 'create-brand' %}">
                            <i class="fa fa-plus"
                               aria-hidden="true"></i>
                            Add Brand
                        </button>
                        <div id="data_table" data-url="{% url 'brand-list' %}">

                        </div>
                    </div>
                    <!--/card-block-->
                </div>
            </div>
        </div>

        <div class="modal fade" tabindex="-1" role="dialog" id="addBrandModal">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">Add Brand</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form create-form" autocomplete="off" method="post"
                              data-url="{% url 'create-brand' %}">
                            <div class="form-group">
                                <label for="brandName">Name</label>
                                <input type="text" class="form-control" name="brandName" id="brandName" required=""
                                       autocomplete="off">
                            </div>
                            <div class="form-group">
                                <label for="brandStatus">Status</label>
                                <select class="form-control" name="brandStatus" id="brandStatus">
                                    <option value="">SELECT</option>
                                    <option value="1">Available</option>
                                    <option value="2">Not Available</option>
                                </select>
                            </div>
                            {% csrf_token %}
                            <div class="modal-footer">
                                <button type="submit" class="btn btn-primary" id="createBrandBtn"
                                        data-loading-text="loading...">Save changes
                                </button>
                            </div>
                        </form>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

        <div class="modal fade" tabindex="-1" role="dialog" id="editBrandModal">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="submit" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">Edit Brand</h4>
                    </div>
                    <div class="modal-body">

                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

        <div class="modal fade" tabindex="-1" role="dialog" id="removeBrandModal">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="submit" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">Remove Brand</h4>
                    </div>
                    <div class="modal-body">
                        <p>Do you want to really delete?</p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
                        <button type="submit" class="btn btn-danger" id="btn-yes-delete">Yes</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
    </div>
{% endblock %}

{% block script %}
    <script src="{% static 'js/brand.js' %}"></script>
{% endblock %}

Downloadable Source Code Below.

Anyway, if you want to level up your programming knowledge, especially python, try this new article I’ve made for you Best Python Projects with source code for Beginners.

But If you’re going to focus on web development using Django, you can download here from our list of Best Django Projects with source code based on real-world projects.

How To Run The Stock Management System Project in Django?

  • Step 1: Extract/unzip the file
  • Step 2: Go inside the project folder, open cmd and type the following commands to install Django Framework and run the webserver:
  • python manage.py migrate
  • python manage.py runserver
  • Step 3: Finally, open the browser and go to http://127.0.0.1:8000/

Summary

In summary, this Stock Management System Project in Django with Source Code can be useful to students or professional who wants to learn python programming language.

This project can also be modified to fit your personal requirements. Hope this project will help you to improve your skills. Happy Coding!

Inquiries

If you have any questions or suggestions about Stock Management System Project in Django with Source Code, please feel free to leave a comment below.

5 thoughts on “Stock Management System Project in Django with Source Code”

Leave a Comment