Supermarket Management System Project in Django with Source Code

This Supermarket Management System Project in Django created based on python, Django, and SQLITE3 Database. Supermarket management system refers to the system in which all parts of supermarket management are handled. These considerations include information about diverse items, staff, management, customers, billing, and so on.

A System allows for the efficient management of retail data. The customer can also buy and pay for the products they’ve chosen. This project is built on a supermarket’s sales transaction and billing of items.

The first action entails entering the items into the system, as well as the rates that are now in effect in the supermarket and the names of the items that the store has agreed to sell.

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

About Project Details

About ProjectProject Details
Project Name Supermarket Management System in Django
Python version (Recommended)3.8 Version
Programming Language UsedPython Django Language
Developer Name itsourcecode.com
IDE Tool (Recommended)Sublime, Visual Studio, PyCharm
Project Type Web Application
DatabaseSQLite
Supermarket Management System in Django Overview

Admin Features

  • Organize and manage a store’s personnel.
  • Monitoring of net income and expenditures.
  • Keep track of all the items sold in the business.
  • Keep track of varied product inventories.
  • Products can be added or removed, and expired products can be removed
  • Users can look up specific product information.
  • Generation of bills.
  • The admin can Supervise employees who work in a store.
  • The admin can Monitor net income and expenses.
  • Admin can keep track of all the items sold in the business.
  • Keep track of varied product inventories.
  • Admin can manage the Products can be added or removed, and expired products can be removed.
  • He should be able to Look for specific product information.

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

Time needed: 5 minutes

Here’s the step’s on how to create a Django Supermarket Management System with Source Code

  • Step 1: Open file.

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

  • Step 3: Select file location.

    Then, select a file location wherever you want.
    choose django forSupermarket Management System Project in Django with Source Code

  • Step 2: Choose Django.

    Next, after click “new project“, choose “Django” and click.

  • 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 supermarket 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

  • Create template for the company form

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

{% load widget_tweaks %}
{% load static %}
{% block content%}
    <script>
        $(document).ready(function() {
           var logo = document.getElementById('nav_logo')
           var img = document.getElementById("comp_logo").getAttribute("src")
           logo.src = img;
        });
    </script>
    <div class="modal fade" tabindex="-1" role="dialog" id="modal" style="z-index: 50px">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content"></div>
        </div>
    </div>
    <div class="container">
        <form method="post" enctype="multipart/form-data" action="{% url 'edit_company' 1 %}">
        {% csrf_token %}
            <div class="modal-header my-0">
                <h5 class="modal-title">UPDATE COMPANY DETAILS</h5>
            </div>
            <div class="modal-body my-0">
                <div class="{% if form.non_field_errors %}invalid{% endif %} mb-2">
                    {% for error in form.non_field_errors %}
                        {{ error }}
                    {% endfor %}
                </div>
                <img id="comp_logo" src="{{ company.logo.url }}" width="30" height="30" class="d-inline-block align-top" alt=""> <br /><br />
                <div class="form-row">
                    {% for field in form %}
                        {% if field.name in ',logo' %}
                            <div class="form-group col-md-12 {% if field.errors %} invalid{% endif %}">
                                <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                                {% render_field field class="form-control" rows="5" placeholder=field.label %}
                                {% for error in field.errors %}
                                    <p class="help-block">{{ error }}</p>
                                {% endfor %}
                            </div>
                        {% endif %}
                    {% endfor %}
                    {% for field in form %}
                        {% if field.name not in 'logo,address,created_by' %}
                            <div class="form-group col-md-6 {% if field.errors %} invalid{% endif %}">
                                <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                                {% render_field field class="form-control" placeholder=field.label %}
                                {% for error in field.errors %}
                                    <p class="help-block">{{ error }}</p>
                                {% endfor %}
                            </div>
                        {% endif %}
                    {% endfor %}
                    {% for field in form %}
                        {% if field.name in ',address' %}
                            <div class="form-group col-md-12 {% if field.errors %} invalid{% endif %}">
                                <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                                {% render_field field class="form-control" rows="5" placeholder=field.label %}
                                {% for error in field.errors %}
                                    <p class="help-block">{{ error }}</p>
                                {% endfor %}
                            </div>
                        {% endif %}
                    {% endfor %}
                </div>
                <div class="form-group justify-content-start">
                    <button type="submit" class="btn-primary py-1">UPDATE DETAILS</button>
                    <button type="reset" class="border-primary text-primary px-3 py-1" rel="modal:close">CANCEL</button>
                </div>
            </div>
        </form>
    </div>
{%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 Supermarket Management System 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:
  • pip install -r requirements.txt
  • 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 2021 Supermarket Management System 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!

Related Articles

Inquiries

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

1 thought on “Supermarket Management System Project in Django with Source Code”

  1. django.db.utils.OperationalError: (1045, “Access denied for user ‘root’@’localhost’ (using password: NO)”)

    i am having this error after runserver pls help

Leave a Comment