Dairy Milk Management System Project in Django with Source Code

Dairy Milk Management System Project in Django with Source Code

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

The Dairy Management System is a software-based program that functions as a dairy software to keep track of daily milk production for registered account members (dairy manager). Customers can access the customer ledger page by logging in.

A Dairy Milk Management System 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.

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

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

Admin Features: Dairy Milk Management System Project in Django

  • The admin account can be created using createsuperuser command.
  • Administrator Can Add Vendors.
  • Administrator Can Add Milk Category For Related Vendor.
  • Admin Can See All The Vendors Dashboard.
  • Admin Can See The Individual Vendor Ledger.
  • Administrator Can Add Customers After Register An User.
  • Admin Can Add Milk Category For Related Customer.
  • Admin Can See All The Customers Dashboard.
  • Administrator Can See The Individual Customer Ledger.
About ProjectProject DetailsDefinition
Project Name Dairy Milk Management System Project in DjangoThe Dairy Management System is used to keep track of dairy, members, and customers, as well as milk collections from members, sales to customers, and plant operations. Collection managers can use the Dairy Management System’s rate card functionality to collect milk of various fats at the correct cost.
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.
Dairy Milk Management System Project in Django Overview

Dairy Milk 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 Dairy Milk 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 Dairy Milk Management System Project in Django with Source Code

  • Step 2: Choose Django.

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

  • Step 3: Select file location.

    Then, select a file location wherever you want.

  • 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 Dairy Milk 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 Dairy Milk Management System Project in Django with Source Code

  • Create template for the add customer form in Dairy Milk Management System Project in Django.

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

{% extends 'base.html' %}
{% load crispy_forms_tags %}


{% block content %}
<style>
  #back {
    /* background-image: linear-gradient(to top, #d5d4d0 0%, #d5d4d0 1%, #eeeeec 31%, #efeeec 75%, #e9e9e7 100%); */
    background-color: #2B2D33;
    color: #B8C6CC;
  }

  .form-control{
    background-color: #2B2D33!important;
    color: #B8C6CC!important;
  }
</style>

<div class="row justify-content-center">
  <div class="col-10">
    <div id="back" class="card">
      <div class="card-body">
        <h2 class="mb-4">Add Customer</h2>
        <hr>
        <form method="POST" novalidate>
          {% csrf_token %}

          <div class="form-row">
            <div class="form-group col-md-4">
              {{ form.user|as_crispy_field }}
            </div>

            <div class="form-group col-md-4">
              {{ form.user_type|as_crispy_field }}
            </div>

            <div class="form-group col-md-4">
              {{ form.contact_number|as_crispy_field }}
            </div>
          </div>



          <div class="form-row">
            <div class="form-group col-md-4">
              {{ form.joining_data|as_crispy_field }}
            </div>
            <div class="form-group col-md-8">
              {{ form.address|as_crispy_field }}
            </div>
          </div>

          <button type="submit" class="btn btn-dark">Save</button>
        </form>
      </div>
    </div>
  </div>
</div>
{% endblock %}

  • Create template for the customer ledger form in Dairy Milk Management System Project in Django.

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

{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% load templatetags %}


{% block content %}
<style>
  .form-control{
    background-color: #2B2D33!important;
    color: #B8C6CC!important;
  }
  select:focus {
    background-color: #2B2D33!important;
    color: #B8C6CC!important;
  }
  option:focus {
    background-color: #2B2D33!important;
    color: #B8C6CC!important;
  }
  input:focus {
    background-color: #2B2D33!important;
    color: #B8C6CC!important;
  }
</style>

<h2 class="vendor_name_heading"><strong>{{ customer_full_name }}</strong></h2>


<div class="table-responsive">
        <table class="table table-bordered">
          <thead>
              <tr>
                <th scope="col">Customer</th>
                <th scope="col">Date</th>
                <th scope="col">Milk Type</th>
                <th scope="col">Quantity(Liter)</th>
                <th scope="col">Save</th>
              </tr>
            </thead>

        <tbody>
          <form action="\customer_ledger_save\" method="POST">
            {% csrf_token %}
              <tr>
               <td scpoe="col">
                 <div class="form-row">
                   <div class="col">
                     <select class="form-control" id="customer" name="customer">
                          <option value="{{ customer_obj.pk }}"> {{ customer_obj.first_name }} {{ customer_obj.last_name }} </option>
                        </select>
                        </div>
                      </div>
                      </td>

                <td scpoe="col">
                  <div class="form-row">
                    <div class="col">
                      <p><input class="form-control" type="text" name="date" id="datepicker"></p>
                    </div>
                  </div>
                </td>
                <td scpoe="col">
                  <div class="form-row">
                    <div class="col">
                      <select  class="form-control" id="milktype" name="milktype">
                        {% for milk, milk_pk in milk_list %}
                        <option value="{{ milk_pk }}"> {{milk}} </option>
                        {% endfor %}
                      </select>
                    </div>
                  </div>
                </td>
                <td scpoe="col">
                  <div class="form-row">
                    <div class="col">
                      <input type="name" class="form-control"  name="quantity" placeholder="0"  pattern="\d+">
                    </div>
                  </div>
                </td>
                <td scpoe="col">
                  <div class="form-row">
                    <div class="col">
                      <button type="submit" class="btn btn-dark border"><i class="fas fa-save" style="background-color: unset !important;">&nbsp;&nbsp;Save</i></button>
                    </div>
                  </div>
                </td>
              </tr>
            </form>


            </tbody>
        </table>
    </div>



  <div class="table-responsive">
      <table class="table table-bordered table-striped ">


        <thead id="theadthid">
          <tr >
                <th scope="col">No.</th>
                <th scope="col">Date</th>
                <th scope="col">Milk Category</th>
                <th scope="col">Price</th>
                <th scope="col">Quantity</th>
                <th scope="col">Total</th>
                <th scope="col">Delete</th>
            </tr>
        </thead>

        <tbody id="tbodydata">
          {% for ledger in customer_ledger_info %}

          <tr>
            <th scope="row">{{ forloop.counter }}</th>
            <td>{{ ledger.date }}</td>
            <td>{{ ledger.related_milk_category }}</td>
            <td>{{ ledger.price }} Tk.</td>
            <td> {{ ledger.quantity }} L</td>
            <td>{% multiply ledger.quantity ledger.price %} Tk.</td>


            <td>
              <form action="{% url 'customer_ledger_delete' %}" method="POST">{% csrf_token %}
                <button class="btn btn-danger"type="submit" name="customer_pk" value="{{ledger.pk}}"><i class="far fa-trash-alt" style="background-color: unset !important; color: unset !important;">&nbsp;&nbsp;Delete</i></button>
                </form>
                </td>
          </tr>
{% endfor %}
<tr>
<td colspan="4"></td>
<td id="totalid"><strong>Grand Total - {{ alltotal }} Tk.</strong></td>
</tr>
          </tbody>
      </table>
  </div>
<!-- Script for datepicker -->
<!-- <script>
$( function() {
  $( "#datepicker" ).datepicker();
  $( "#datepicker" ).datepicker("show");

  // $( "#datepicker" ).datepicker("setDate","0");
} );
</script> -->
<script>
  $(function() {
      $( "#datepicker" ).datepicker({dateFormat:"dd-mm-yy",});

  });
</script>


{% endblock %}

  • Create template for the customer sign up form in Dairy Milk Management System Project in Django.

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

{% extends 'base.html' %}
{% load crispy_forms_tags %}


{% block content %}
<style>
  #back {
    /* background-image: linear-gradient(to top, #d5d4d0 0%, #d5d4d0 1%, #eeeeec 31%, #efeeec 75%, #e9e9e7 100%); */
    background-color: #2B2D33;
    color: #B8C6CC;
  }

  .form-control{
    background-color: #2B2D33!important;
    color: #B8C6CC!important;
  }

  /* .form-control, .form-control:focus{
   box-shadow: none;
   border: #B8C6CC!important;
  } */
</style>

<div class="row justify-content-center">
  <div class="col-10">
    <div id="back" class="card">
      <div class="card-body">
        <h2 class="mb-4">Customer SignUp</h2>
        <hr>
        <form method="POST" novalidate>
          {% csrf_token %}

          <div class="form-row">
            <div class="form-group col-md-4">
              {{ form.username|as_crispy_field }}
            </div>

            <div class="form-group col-md-4">
              {{ form.first_name|as_crispy_field }}
            </div>

            <div class="form-group col-md-4">
              {{ form.last_name|as_crispy_field }}
            </div>
          </div>


          <div class="form-row">

            <div class="form-group col-md-4">
              {{ form.email|as_crispy_field }}
            </div>

            <div class="form-group col-md-4">
              {{ form.password1|as_crispy_field }}
            </div>
            <div class="form-group col-md-4">
              {{ form.password2|as_crispy_field }}
            </div>

          </div>

          <button type="submit" class="btn btn-dark">Register</button>
        </form>
      </div>
    </div>
  </div>
</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 Dairy Milk 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:
  • 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, the Dairy Milk 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 Dairy Milk Management System Project in Django with Source Code, please feel free to leave a comment below.

Leave a Comment