Food Bank Management System Project in Django with Source Code

Food Bank Management System Project in Django with Source Code

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

It has many of the same features as the popular food panda app for ordering meals online.

It offers an interactive user interface that allows users to browse all foods and their details, as well as add foods to their blog profiles. Similarly, it has an admin panel where the administrator may handle all of the users, posts, and food information.

A Food Bank 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 Food Bank Management System Project in Python Django, makes sure that you have PyCharm Professional IDE Installed in your computer.

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

User Features: Food Bank Management System Project in Django

  • Register Page– The page where new user created their login credentials for the website.
  • Login Page – The page where the system user enters their system credentials in order to gain access to the system’s users side.
  • Manage User – The page where the user can view, like review, Update their own profile, Edit their posted review also can delete them.
  • Create Post – The page where the user can create a post for the restaurant.
  • View Restaurant – The page where the user can view all the restaurant posted.
  • Send Comments – The page where the user can send a comments to the admin.
About ProjectProject DetailsDefinition
Project Name Food Bank Management System Project in DjangoYour referrers will have access to a portal provided by the food bank management system, which allows them to enter all pertinent information online and submit it to the food bank in real time. The referral can then be processed by the food bank, who will schedule when the food will be delivered to the person in need.
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.
Food Bank Management System Project in Django Overview

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

  • Step 2: Choose Django.

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

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

  • Create template for the navigation bar in Food Bank Management System 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/.

<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
    <div class="container">
    <a class="navbar-brand" href="{% url 'home' %}">Food Bank Management System</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
            aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarResponsive">
            <ul class="navbar-nav ml-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="{% url 'home' %}">Home
                        <span class="sr-only">(current)</span>
                    </a>
                </li>
                {% if request.user.is_authenticated %}
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'my_posts' %}">Dashboard</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'profile' request.user.id %}">Profile</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'create' %}">Create Post</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'logout' %}">Logout</a>
                </li>
                {% else %}
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'login' %}">Login</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'register' %}">Register</a>
                </li>
                {% endif %}
                    
            </ul>
        </div>
    </div>
</nav>

  • Create template for the list of restaurant in Food Bank Management System Project in Django.

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

{% extends 'base.html' %}
{% load humanize %}
{% block title %}{{ block.super }}| Home{% endblock title %}
{% block content %}
<!-- Blog Entries Column -->
<div class="row">
  <div class="col-md-8 my-4">
    <!-- Blog Post -->
    <div class="row">
      {% if object_list %}
      {% for obj in object_list %}
      <div class="col-md-6">
        <div class="card mb-4">
          <img class="card-img-top" src="{{ obj.image.url }}" alt="Card image cap" style="height:160px">
          <div class="card-body">
            <h3 class="card-title">
              <a href="{% url 'detail' obj.slug %}">{{ obj.title }}</a>
            </h3>
            <p class="card-text">
              <div class="row">
                <div class="col-md-6">
                  <b>Price:</b> ₱{{ obj.price|intcomma }}
                </div>
                <div class="col-md-6">
                  <b>Likes:</b> {{ obj.likes_count }}
                </div>
              </div>
              <div class="row">
                <div class="col-md-6">
                  <b>Taste:</b> {{ obj.taste }} out of 10
                </div>
                <div class="col-md-6">
                  <b>Person:</b> {{ obj.persons }}
                </div>
              </div>
              <div class="row">
                <div class="col-md-12">
                  <b>Category: </b>
                  {% for cat in obj.get_categories %}
                  <a href="?q={{ request.GET.q }}&cat={{ cat }}">{{ cat }}</a>
                  {% endfor %}
                </div>
              </div>
            </p>
            <a href="{% url 'detail' obj.slug %}" class="btn btn-secondary">Details</a>
            <div class="float-right user-icons">
              {% if obj in user_liked_posts %}
              <form action="{% url 'home' %}" id='like_form{{ obj.id }}' method="POST">
                {% csrf_token %}
                <input type="hidden" name="unlike" value="{{ obj.id }}">
                <a href="javascript:{}" onclick="document.getElementById('like_form{{obj.id}}').submit(); return false;">
                  <i class="fas fa-thumbs-up"></i></a>
              </form>
              {% else %}
              <form action="{% url 'home' %}" id='unlike_form{{ obj.id }}' method="POST">
                {% csrf_token %}
                <input type="hidden" name="like" value="{{ obj.id }}">
                <a href="javascript:{}" onclick="document.getElementById('unlike_form{{obj.id}}').submit(); return false;">
                  <i class="far fa-thumbs-up"></i></a>
              </form>
              {% endif %}
            </div>
          </div>
          <div class="card-footer text-muted">
            Updated: {{obj.updated_at|naturaltime}}, By
            <a href="?author={{ obj.user }}">{{ obj.user }}</a>
          </div>
        </div>
      </div>
      {% endfor %}
      {% else %}
      <P class="btn btn-warning ml-3">Sorry !! No post found...</P>
      {% endif %}
    </div>

    <!-- Pagination -->
    {% if is_paginated %}
    <ul class="pagination justify-content-center mb-4">
      {% if page_obj.has_previous %}
      <li class="page-item">
        <a class="page-link" href="?page={{ page_obj.previous_page_number }}">&larr; Older</a>
      </li>
      {% else %}
      <li class="page-item disabled">
        <a class="page-link" href="">&larr; Older</a>
      </li>
      {% endif %}

      {% if page_obj.has_next %}
      <li class="page-item">
        <a class="page-link" href="?page={{ page_obj.next_page_number }}">Newer &rarr;</a>
      </li>
      {% else %}
      <li class="page-item disabled">
        <a class="page-link" href="#">Newer &rarr;</a>
      </li>
      {% endif %}
    </ul>
    {% endif %}
  </div>
  {% endblock content %}
  • Create template for the login form in Food Bank Management System Project in Django.

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

{% extends 'base.html' %}
{% block widgets %}{% endblock widgets %}
{% block title %}{{ block.super }}| User Login{% endblock title %}
{% block content %}
<div class="row my-4">
    <div class="col-md-12">
        {% if messages %}
        {% for message in messages %}
        <div class="alert alert-success alert-dismissible fade show" role="alert">
            {{ message }}
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
        {% endfor %}
        {% endif %}
    </div>
    <div class="col-md-4 offset-md-4" style="margin-top:30px; margin-bottom: 120px">
        <div class="card">
            <h5 class="card-header text-center">User Login</h5>
            <div class="card-body">
                {% if form.errors %}
                <p style="color:red">Your username and password didn't match. Please try again.</p>
                {% endif %}
                <form method="post" action="{% url 'login' %}">
                    {% csrf_token %}
                    <div class="form-group">
                        <label for="username">{{ form.username.label_tag }}</label>
                        <input type="text" name="username" autofocus="" required="" id="id_username" class="form-control"
                            placeholder="Enter your username">
                    </div>
                    <div class="form-group">
                        <label for="pwd">Password:</label>
                        <input type="password" name="password" required="" id="id_password" class="form-control"
                            placeholder="Enter your password">
                    </div>
                    <button type="submit" class="btn btn-primary">Login</button>
                </form>
                <p><a href="{% url 'password_reset' %}">Lost password?</a></p>
            </div>
        </div>
    </div>
</div>
{% endblock content %}

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 Food Bank 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 Food Bank 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 Food Bank Management System Project in Django with Source Code, please feel free to leave a comment below.

Leave a Comment