Employee Management System Project in Django with Source Code

Employee Management System Project in Django with Source Code

A Employee Management System in Django, Keeps track of all of the employee’s information and data. We’ve created all of the employee’s, and company crud (create, read, update, and delete) operations. This is a role-based module in which the admin can perform any operation on the data. The key module in this project is the employee module, which handles the employee features and company module handles company features.

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

This Employee Management System 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 Employee Management System Project in DjangoThis Employee Management System in Django is a Python-based project. Using Python, Django, and MySQL, we built a payroll management system.
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.
Employee Management System Project in Django overview

Admin Features of Employee Management System Project in Django

  • Manage Employee – For the employee, The admin can view the list of employee details. The admin can add, and edit, employee information.
  • Manage Company – For the company, The admin can view the list of company details. Admin can update the record of the company details.
  • Login – By default the admin need to login first to enable to access the system.
  • Logout – By default the admin can logout in the system.

Employee 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 Employee Management System Project in Django

  • Step 1: Open file.

    First , open “pycharm professional” after that click “file” and click “new project“.

  • Step 2: Choose Django.

    Next, after click “new project“, choose “Django” and click.
    choose django for Employee 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.
    Create application name for Employee Management System Project in Django with Source Code

  • Step 5: Click create.

    Lastly, finish creating project by clicking “create” button.
    Finish Creating Project Name for Employee 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 Employee Management System Project in Django

  • Create template for the login in form in Employee 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 mirai/templates/registration.

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

  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>

<link rel="stylesheet" type="text/css" href="{% static '/styles.css' %}">

{% block title %}Login{% endblock %}

{% block content %}
<h2 style="color: White;">Admin Login</h2>
<form method="post" class="form">
  {% csrf_token %}
  <div style="color: beige;">
  {{ form.as_p }}</div> <br>
  <button class="btn-success btn-badge" type="submit">Login</button>
</form>
{% endblock %}

  • Create template for the add employee form in Employee Management System Project in Django.

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

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Mirai web app</title>
    {% load static %}
    <link rel="stylesheet" type="text/css" href="{% static '/styles.css' %}">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  
  </head>
  <body>
    <div>
      <div class="booking-form">
          <h3 style="color: bisque;padding-top: 5%;">Add Employee Details</h3>
    <form method="POST" action="/emp">
      {% csrf_token %}

      <div class="form-group">
        <label class="form-label">First Name:</label>
        <div>{{form.eFname}}</div>
        <!--<<input type="text" value="{{form.eFname}}" />-->
      </div>

      <div class="form-group">
        <label class="form-label">Last Name:</label>
       <div>{{form.eLname}}</div>
         <!--<input type="text" value="{{form.eLname}}" />-->
      </div>

      <div class="form-group">
    <label class="form-label">Company:</label> 
    <div>{{form.eCompany}}</div>
</div>
<p style="color:crimson">Company not available?</p><button class="btn-warning btn-sm" onclick="location.href='/comp'">Click Here</button>

      <div class="form-group">
        <label class="form-label">Employee Email:</label>
        <div>{{form.eEmail}}</div>
        <!--<input type="text" value="{{form.eEmail}}" />-->
      </div>

      <div class="form-group">
        <label class="form-label">Employee phone:</label>
        <div>{{form.ePhone}}</div>
        <!--<input type="text" value="{{form.ePhone}}" />-->
      </div><br>

      <button type="submit" class="btn-success">Submit</button>
    </form>
  </div></div>
  </body>
</html>

  • Create template for the company table in Employee Management System Project in Django.

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

<!DOCTYPE html>
<html lang="en">
  <head>
    <!--{% load static %}
    <link rel="stylesheet" type="text/css" href="{% static '/styles.css' %}">-->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  
  </head>

  <body>
    <center><div><h2 class="bg-primary text-white">List of Company</h2></div></center>
    <table class="table">
      <thead class="bg-danger text-white">
        <tr>
          <th>Company Name</th>
          <th>Email</th>
          <th>Logo</th>
          <th>website</th>
          <th>Actions</th>
        </tr>
      </thead>

      <tbody>
        {% for company in companies %}
        <tr>
          <td>{{company.cName}}</td>
          <td>{{company.cEmail}}</td>
          <td>{{company.cLogo}}</td>
          <td>{{company.cUrl}}</td>
          <td>
            <!--<a href="/delete/{{company.cName}}">Delete</a>
            <a href="/edit/{{company.cName}}">Update</a>
            <a href="emp">Update</a>-->
            <button class="btn-danger btn-sm" onclick="location.href='/delete/{{company.cName}}'">Delete</button>
            <button class="btn-success btn-sm" onclick="location.href='/edit/{{company.cName}}'">Update</button>
            <button class="btn-primary btn-sm" onclick="location.href='/emp'">Add Employee</button>

          </td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
  </body>
</html>

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 Employee 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/

For admin panel:

  • Username: admin
  • Password: adminl12345

Summary

In summary, this 2022 Employee 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 Employee Management System Project in Django with Source Code, please feel free to leave a comment below.

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

Leave a Comment