Progressive Django v2.0: Enhancing Your HRMS System
Written on
Chapter 1: Overview of the HRMS Upgrade
In our previous series, we successfully developed a basic Human Resource Management System (HRMS) version 1. Today, we are embarking on a new journey to enhance this system to version 2, introducing several new functionalities.
Here’s an informative video tutorial to complement this discussion.
Project Highlights for HRMS v2
In HRMS version 2, we will retain some foundational elements from version 1 while implementing notable improvements:
- Framework: We will continue using Django without separating the frontend and backend. The separation of these components will be considered for a future version.
- Database Interaction: In the previous version, we relied on raw SQL queries for data management. This approach is not prevalent in real-world applications. Instead, we'll utilize Object Relational Mapping (ORM), a standard method for handling interactions between the model layer and the database. Django offers built-in ORM capabilities, making it an excellent choice for developers. While raw SQL can sometimes enhance performance in complex queries, it is generally not necessary for simpler projects like our HRMS.
- Mock Data Creation: In the first version, we converted client-provided data from Excel into a PostgreSQL database and used Django's inspectdb to create model definitions. In version 2, we will employ a factory class to generate mock data seamlessly.
- Frontend Interactivity: As in version 1, we will utilize jQuery for enhancing user interactions, particularly for data submissions and queries.
About the Development Environment
For the second version, we will be working within the following development environment:
- Operating System: Rocky Linux 9.3, closely aligned with RHEL 9.x, which is popular in enterprise settings. Many distributions, such as Amazon Linux, are based on CentOS/RHEL/Fedora.
- Python Version: Python 3.11.8
- Django Version: Django 5.0.3
- Database: PostgreSQL 16.2 (managed through Docker)
- IDE: Neovim 9.5 (a refreshing choice!)
Starting Your Django Project
The process to kickstart a Django project follows a standard procedure:
- Create and activate a virtual environment.
- Install necessary libraries, particularly Django.
- Initiate a project using the django-admin command.
- Create a Django app.
- Configure app settings, including database connections, template directories, and static files.
- Conduct a test run to ensure the project operates smoothly.
Now that our project is initialized correctly, we can proceed to develop the remaining components of the application. Thank you for your engagement!
Engage with Us
Thank you for being part of the In Plain English community! We invite you to support our work: Be sure to clap and follow the author!
Follow us on: X | LinkedIn | YouTube | Discord | Newsletter
Explore our other platforms: Stackademic | CoFeed | Venture | Cubed
Find more content at PlainEnglish.io