Django Employee Management System with Source Code

An Employee Management System in Django keeps track of all of the employee’s information and data. We’ve created all of the employee 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 employee and company modules, which handle employee features, are the project’s key modules.

Moving on, 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 simple Python Django.

However, to start creating an Employee Management System Project in Python Django, make sure that you have PyCharm Professional IDE installed on your computer.

Anyway, this Django framework employee leave management system also includes a free Download Source Code; simply find the downloadable source code below and click download button. 

Also, Visit or read the other interesting languages used in employee management system.

Project Information and Recommended Tools Used

About ProjectProject Details
Project Name Employee Management System Project in Django
Python version (Recommended)3.8 Version
Programming Language UsedPython Django Language
IDE Tool (Recommended)Sublime, Visual Studio, PyCharm
Project Type Web Application
DatabaseSQLite
Employee Management System Project in Django overview

Admin Features

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

How to Create Employee Management System Django?

Time needed: 5 minutes

Here’s the step’s on how to create a Django Employee Management System

  • Step 1: Open file.

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

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

Modules Functionality

  • Create template for the login in form

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

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 employee information system project in Django can be useful to students or professionals who want to learn the Python programming language. This project can also be modified to fit your personal requirements. I hope this project will help you to improve your skills. Happy Coding!

Inquiries

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

4 thoughts on “Django Employee Management System with Source Code”

Leave a Comment