Human Resource Management System in Django with Source Code

Human Resource Management System in Django with Source Code

A Human Resource Management System in Django, Keeps track of all of the employee’s information and data. We’ve created all of the employee’s crud (create, read, update, and delete) operations. This is a role-based module in which the admin can perform any operation on the data, but the employee can only see his or her own data, so access label limitations have been added to the project. It has Admin side which allows extra features like manage employee, attendance, leave, department, recruitment and payroll.

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

This Human Resource 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 Human Resource Management System in DjangoThis Human Resource Management System Project in Django created based on python, Django, and MYSQL Database . A Human Resource Management System created using Python Django Framework on the backend and HTML, CSS, and JavaScript on the frontend .
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.
Human Resource Management System Project in Django overview

Admin Features of Human Resource Management System in Django

  • Manage Employee – For the employee, The admin can add, edit, and delete employee information.
  • Salary Management – For the salary, The admin can see the list of employee salary details. Admin can update and delete the record of the employee salary.
  • Manage Leave – For the leave, the admin can see the employee who wants to leave and admin can approved or declined employee to request a leave.
  • Manage Department – For the department, The admin can add, edit, and delete department information.
  • Login – By default the admin need to login first to enable to access the system.
  • Registration – For the registration, the user needs to register first to create an account.
  • Manage Recruitment – For the recruitment, the admin can see list of all recruitment.

Human Resource 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 Human Resource Management System in Django

Human Resource Management System in...
Human Resource Management System in Django with Source Code | Django Project with Source Code
  • Step 1: Open file.

    First , open “pycharm professional” after that click “file” and click “new project“.
    Create new Project for Human Resource Management System 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.
    Create location name for human resource management system in Django with source code

  • Step 4: Create application name.

    After that, name your application.
    Create application name for human resource management system in Django with source code

  • Step 5: Click create.

    Lastly, finish creating project by clicking “create” button.
    FInish creating project name for human resource management system 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 Human Resource Management System in Django

  • Create template for the login in form Human Resource Management System 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/hrms/registrations.

{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>ITSC-HRMS Login</title>
  <!-- plugins:css -->
  <link rel="stylesheet" href="{% static 'hrms/vendors/iconfonts/mdi/css/materialdesignicons.min.css' %} ">

  <!-- endinject -->
  <!-- plugin css for this page -->
  <!-- End plugin css for this page -->
  <!-- inject:css -->
  <link rel="stylesheet" href="{% static 'hrms/css/style.css' %}">
  <!-- endinject -->
  <link rel="shortcut icon" href="{% static 'hrms/images/favicon.png' %}" />
</head>

<body>
  <div class="container-scroller">
    <div class="container-fluid page-body-wrapper full-page-wrapper auth-page">
      <div class="content-wrapper d-flex align-items-center auth auth-bg-1 theme-one">
        <div class="row w-100 mt-5">
          <div class="col-lg-4 mx-auto">
            <div class="text-center mb-2">
              <img src=" {% static 'hrms/images/human.png' %} " width="150px" alt="">
            </div>
            <p class="display-4 mb-4 text-center text-white bg-info">Administrator Login</p>
            <div class="auto-form-wrapper mb-5">
              <form action=" {% url 'hrms:login' %} " method ='POST'>
                {% csrf_token %}
                <div class="form-group">
                  <label class="label">Username</label>
                  <div class="input-group">
                    {{form.username}}
                    <div class="input-group-append">
                      <span class="input-group-text">
                        <i class="mdi mdi-check-circle-outline"></i>
                      </span>
                    </div>
                  </div>
                </div>
                <div class="form-group">
                  <label class="label">Password</label>
                  <div class="input-group">
                    {{form.password}}
                    <div class="input-group-append">
                      <span class="input-group-text">
                        <i class="mdi mdi-check-circle-outline"></i>
                      </span>
                    </div>
                  </div>
                </div>
                <div class="form-group">
                  <button class="btn btn-primary submit-btn btn-block">Login</button>
                </div>               
                <div class="text-block text-center my-3">
                  <span class="text-small font-weight-semibold">Not a member ?</span>
                  <a href="{%  url 'hrms:reg'  %} " class="text-black text-small">Create new account</a>
                </div>
              </form>
            </div>
            <p class="footer-text text-center mt-4" style="background-color: blue; color: white;">Copyright © {{ 2021}} Itsourcecode Human Resource Management. All Rights Reserved.</p>
          </div>
        </div>
      </div>
      <!-- content-wrapper ends -->
    </div>
    <!-- page-body-wrapper ends -->
  </div>

</body>

</html>

  • Create template for the registration form Human Resource Management System in Django.

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

{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>ITSC-HRMSC Registration</title>
  <!-- plugins:css -->
  <link rel="stylesheet" href="{% static 'hrms/vendors/iconfonts/mdi/css/materialdesignicons.min.css' %} ">
  
  
  <link rel="stylesheet" href="{% static 'hrms/css/style.css' %}">
  <!-- endinject -->
  <link rel="shortcut icon" href="{% static 'hrms/images/favicon.png' %}" />
</head>

<body>
  <div class="container-scroller">
    <div class="container-fluid page-body-wrapper full-page-wrapper auth-page">
      <div class="content-wrapper d-flex align-items-center auth register-bg-1 theme-one">
        <div class="row w-100">
          <div class="col-lg-4 mx-auto">
            <div class="text-center mb-2">
              <img src=" {% static 'hrms/images/logo.png' %} " alt="">
            </div>
            <h2 class="text-center mb-4 text-secondary">Administrator Registration</h2>
            <div class="auto-form-wrapper">
              <form method ='POST' enctype='multipart/form-data'>
                {% csrf_token %}
                {{form.errors}}
                <div class="form-group">
                  <div class="input-group">
                      {{form.username}}
                    <div class="input-group-append">
                      <span class="input-group-text">
                        <i class="mdi mdi-check-circle-outline"></i>
                      </span>
                    </div>
                  </div>
                </div>
                <div class="form-group">
                  <div class="input-group">
                      {{form.email}}
                    <div class="input-group-append">
                      <span class="input-group-text">
                        <i class="mdi mdi-check-circle-outline"></i>
                      </span>
                    </div>
                  </div>
                </div>

              <div class="form-group">
                  <div class="input-group">
                      {{form.password1}}
                    <div class="input-group-append">
                      <span class="input-group-text">
                        <i class="mdi mdi-check-circle-outline"></i>
                      </span>
                    </div>
                  </div>
                </div>

                <div class="form-group">
                  <div class="input-group">
                      {{form.password2}}
                    <div class="input-group-append">
                      <span class="input-group-text">
                        <i class="mdi mdi-check-circle-outline"></i>
                      </span>
                    </div>
                  </div>
                </div>


                 <div class="form-group">
                  <div class="input-group">
                      {{form.thumb}}
                  </div>
                </div>
                
                <div class="form-group">
                  <button class="btn btn-success submit-btn btn-block">Register</button>
                </div>
                <div class="text-block text-center my-3">
                  <span class="text-small font-weight-semibold">Already have and account ?</span>
                  <a href="{%  url 'hrms:login'  %}" class="text-black text-small">Login</a>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
      <!-- content-wrapper ends -->
    </div>
    <!-- page-body-wrapper ends -->
  </div>
</body>

</html>

  • Create template for the payroll Human Resource Management System in Django.

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

{% extends 'hrms/layout.html' %}
{% load static %}
{% block title %} Staff Payroll | ITSC-HRMS {% endblock title %}
      <!--  MAIN BODY START HERE -->
          {% block content %}

            <div class="main-panel">
        <div class="content-wrapper">
          <div class="row">
           <p class="lead text-center">Staffers Payroll System</p>
            <div class="col-lg-12 grid-margin">
              <div class="card">
                <div class="card-body">
                 
                  <div class="table-responsive">
                    <table class="table table-bordered">
                      <thead>
                        <tr>
                          
                          <th>
                            Image
                          </th>
                          <th>
                            First name
                          </th>
                          <th>
                            Last name
                          </th>
                          <th>
                            Account Number
                          </th>
                          <th>
                            Bank Name
                          </th>
                          <th>
                            Salary
                          </th>

                           <th>
                            Action
                          </th>

                        </tr>
                      </thead>
                      <tbody>

                      {% for emp in emps %}
                        <tr>
                          <td class="font-weight-medium">
                            <img src="{{emp.thumb.url}}" class='img-fluid rounded-circle' alt="">
                          </td>
                          <td>
                            {{emp.first_name}}
                          </td>
                          <td>
                            {{emp.last_name}}
                          </td>
                          
                           <td>
                            {{emp.nuban}}
                          </td>
                          <td>
                            {{emp.bank}}
                          </td>
                           <td>
                            {{emp.salary}}
                          </td>
                           <td>
                            <button  type='button' onclick="payWithPaystack('{{emp.salary}}','{{emp.nuban}}','{{emp.bank}}')"  class="btn btn-info">  Pay</button>
                          </td>
                        </tr>
                      {% endfor %}                   
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>
         
                  </div>
                </div>
              </div>
            </div>
          </div>
          
        </div>
        {% endblock content %}

  • Create template for the leave form Human Resource Management System in Django.

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

{% extends 'hrms/layout.html' %}
{% load static %}
{% block title %} Leave| ITSC-HRMS {% endblock title %}

{% block content %}

    <div class="main-panel">
        <div class="content-wrapper">
            <div class="row">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="{% url 'hrms:dashboard' %}">Dashboard</a></li>
                        <li class="breadcrumb-item active" aria-current="page">Leave Management </li>
                    </ol>
                </nav>
                <div class="col-lg-12 grid-margin">
                    <div class="card">
                        <div class="card-body">
                           <h4 class="text-center text-primary"><i class="fa  fa-check-square-o">&emsp; Employee Leave Management </i></h4><hr>
                                <form class="form-group" method="POST">
                                    {% csrf_token %}
                                    <small class="mb-5">** All Fields are required</small><br>
                                        <div class="table-responsive">
                                            <table class="table table-striped">
                                                <thead>
                                                    <tr>
                                                        <th>
                                                            Start Date
                                                        </th>
                                                        
                                                        <th>
                                                            End Date
                                                        </th>
                                                        <th>
                                                            Status
                                                        </th>
                                                        <th>
                                                            Employee
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td class="py-1">
                                                            {{form.start}}
                                                        </td>
                                                        
                                                        <td>
                                                           {{form.end}}
                                                        </td>
                                                        <td>
                                                            {{form.status}}
                                                        </td>
                                                        <td>
                                                            {{form.employee}}
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>

                                        
                                    <div class="text-center mt-3">
                                        <button class="btn btn-rounded btn-outline-success"><i class="mdi mdi-check"></i>Submit</button></button>
                                    </div>
                                </form><br>
                            <h4 class="text-center text-primary"><i class="fa  fa-sign-in">&emsp; Approved Applications </i> </h4><hr>
                            {% if leaves %}
                            <small class='text-center'>This is a list of approved Staffers leaves application. </small>
                             <div class="table-responsive">
                                            <table class="table table-striped">
                                                <thead>
                                                    <tr>
                                                        <th>
                                                            Start Date
                                                        </th>
                                                        
                                                        <th>
                                                            End Date
                                                        </th>
                                                        <th>
                                                            Status
                                                        </th>
                                                        <th>
                                                            Employee
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    {% for leave in leaves %}
                                                        <tr>
                                                            <td class="py-1">
                                                                {{leave.start}}
                                                            </td>
                                                            <td>
                                                            <strong>{{leave.end}}</strong>  
                                                            </td>
                                                            <td>
                                                            
                                                                <strong>{{leave.status}}</strong>  
                                                            </td>
                                                            <td>
                                                            {{leave.employee}}
                                                            </td>
                                                            <td>
                                                                
                                                            </td>
                                                        </tr>
                                                    {% endfor %}
                                                </tbody>
                                            </table>
                                        </div>
                            {% else %}
                                <p class="lead"> There are currently no leave application. </p>
                            {% endif %}   
                                
                </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 Human Resource 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 runserver
  • Step 3: Finally, open the browser and go to http://127.0.0.1:8000/

For admin panel:

  • Username: admin
  • Password: myrel12345

Summary

In summary, this 2022 Human Resource 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!

Inquiries

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

Leave a Comment