Django School Management Report and Documentation (1) - 1
Django School Management Report and Documentation (1) - 1
CERTIFICATE
This is to certify that the project entitled “Django School Management System"
is a Bonafide Work done by GANDEPALLI SAI TARUN with the Regd. No. Y21CSE279025 is submitted
in partial fulfilment of the requirement for the award of the Degree "BACHELOR OF TECHNOLOGY IN
COMPUTER SCIENCE AND ENGINEERING” during the academic year 2024-2025.
I am deeply grateful to my project platform IIDT BLACKBUKS for their invaluable guidance
and support throughout this project. Their insights and expertise have been instrumental in shaping the
development process. I would also like to thank my peers for their constructive feedback and
collaboration. Special thanks to my family for their encouragement and understanding during this time.
The satisfaction that accompanies the successful completion of any task would be incomplete without
the mention of the people who made it possible and whose constantguidance and encouragement crown all
the efforts with success. This acknowledgementtranscends the reality of formality when we would like to
express deep gratitude and respect to all those people behind the screen who guided, inspired and helped
me for thecompletion of my project work.
I extremely grateful to my esteemed teacher and guide Dr. Md. Ali Mirza, Department of
Computer Science & Engineering, Krishna University College of Engineering and Technology, for
giving me an opportunity to work on a project with his timely suggestions and guidance.
I express my profound thanks to Prof. R. Srinivasa Rao, Vice Chancellor, and Prof. K. Sobhan
Babu, and Prof. M. V. Basaveswara Rao, Krishna University and Prof. Y. K. Sundara Krishna Dean,
Faculty of Engineering and Technology, For their valuable motivation and support in Completing my
Summer Internship.
I express my heartful thanks to our Faculty and Non-Teaching Staff.
Sincerely,
GANDEPALLI SAI TARUN
Y21CSE279025
DECLARATION
This is to certify that the work reported in thesis titled "Django School Management
System", submitted in the Department of COMPUTER SCIENCE AND ENGINEERING(CSE),
Krishna University College of Engineering and Technology, Machilipatnam in the partial fulfilment of
degree for the award of Bachelorof Technology, and is a Bonafide work done by me.
The Report consists in the document is fully/partially owned by me under the guidance of our
Guide and Trained by the IIDT-APSCHE partner BLACKBUCKS of FULL STACK
DEVELOPMENT INTERNSHIP .
The reported results are based on the project work entirely done by me and not copied from any
other source.
Sincerely,
GANDEPALLI SAI TARUN
Y21CSE279025
INDEX
1 Abstract 01
2 Key Features 02
3 Technologies Used
4 Objectives
5 Introduction
6 Advantages and Disadvantages 05
6.1. Advantages
6.2. Disadvantages
7 Software and Hardware Requirements 07
7.1. Software Requirements
7.2. Hardware Requirements
8 Motivation 08
9 Literature Review 08
10 Existing System 09
11 Proposed System 10
12 Keywords & Definitions 10
13 Implementation 12
14 Challenges faced 14
15 Source Code 15
15.1. Login.html
15.2. home_content.html
15.3. admin_view_attendance.html
15.4. student_view_attendance.html
15.5. staff_take_attendance.html
16 Results 40
17 Conclusion 47
1. Abstract
The title of the project is “Django School Management System”. This is a comprehensive web
application designed to handle all the administrative and academic operations of educational
institutions. SMS has most of the facilities that a modern school requires to computerize its day-to-
day jobs. Leveraging the robust capabilities of the Django web framework, this system provides a
user-friendly interface and efficient functionality to manage various aspects of school management,
including student enrolment, attendance, grades, schedules, and communication between teachers,
students, and parents. With advanced data management capabilities, SMS provides actionable
insights for better decision-making and ensures the confidentiality and security of sensitive
information.
1
2. Key Features:
3. Technologies Used:
4. Objectives:
2
5. Introduction
The Django School Management System is a comprehensive web application designed to handle
the multifaceted administrative and academic operations of educational institutions. Developed
using the Django framework (Python) for the backend, and technologies like HTML, CSS,
JavaScript, and Bootstrap for the frontend, this system ensures a robust, scalable, and user-friendly
interface. The core objective of this project is to automate routine tasks, reduce the administrative
burden on school staff, and enhance the accuracy and efficiency of data management within the
institution.
User Management:
One of the key features of the Django School Management System is its robust user management
module. This module allows for the creation and management of various user roles, including
administrators, teachers, students, and parents. Each user role has specific permissions and access
levels, ensuring that sensitive information is only accessible to authorized personnel. The system
facilitates easy registration, profile management, and authentication processes, ensuring secure and
streamlined user interactions.
The student information system (SIS) is the heart of the Django School Management System. It
provides a centralized repository for all student-related data, including personal information,
academic records, and disciplinary history. The SIS enables administrators and teachers to
efficiently manage student enrolments, track academic progress, and generate comprehensive
reports. This module also supports advanced search and filtering capabilities, making it easy to
retrieve specific student information as needed.
Attendance Management:
Managing attendance is a crucial aspect of school administration, and the Django School
Management System simplifies this task significantly. Teachers can mark daily attendance, track
tardiness, and record absences directly within the system. The attendance module integrates
seamlessly with the student information system, allowing for real-time updates and notifications.
Parents can also access their child's attendance records through the system, promoting transparency
and accountability.
3
Grade Management:
The grade management module of the Django School Management System allows teachers to record
and manage student grades efficiently. This module supports various grading scales and methods,
ensuring flexibility in assessment practices. Teachers can input grades for assignments, tests, and
exams, and the system automatically calculates overall scores and generates report cards. The grade
management module also provides analytical tools to track student performance trends over time.
Creating and managing schedules can be a complex task for educational institutions, but the Django
School Management System streamlines this process. The schedule and timetable management
module allows administrators to create detailed timetables for classes, exams, and extracurricular
activities. Teachers and students can access their schedules online, ensuring that everyone is aware
of their commitments and responsibilities. The system also supports automated conflict detection,
preventing scheduling overlaps and ensuring optimal resource utilization.
Communication Module:
Effective communication is vital for the smooth operation of any educational institution. The
Django School Management System includes a robust communication module that facilitates
seamless interaction between administrators, teachers, students, and parents. This module supports
various communication channels, including email, SMS, and in-app messaging. Important
announcements, reminders, and updates can be quickly disseminated to the relevant stakeholders,
ensuring that everyone stays informed and engaged.
4
6. Advantages & Disadvantages
6.1. Advantages
3. Enhanced Communication
Effective communication is critical in educational settings, and the Django School Management
System facilitates seamless interaction among administrators, teachers, students, and parents. The
integrated communication module supports various channels, including email, SMS, and in-app
messaging, ensuring timely and efficient dissemination of information.
4. User-Friendly Interface
The system is designed with a user-friendly interface, making it easy for users of all technical
backgrounds to navigate and utilize its features. This ease of use reduces the learning curve and
encourages adoption among staff, students, and parents.
5
7. Scalability
The system is scalable, making it suitable for institutions of varying sizes. Whether it’s a small
school or a large educational organization, the Django School Management System can handle
increasing data volumes and user loads without compromising performance.
6.2. Disadvantages
3. Dependence on Technology
The system’s effectiveness is heavily reliant on technology infrastructure. Issues such as server
downtime, network failures, or software bugs can disrupt operations, leading to potential delays and
inconvenience for users.
6
6. Customization Complexity
While the system is highly customizable, extensive customization may require advanced technical
skills and knowledge of the Django framework. Smaller institutions without dedicated IT staff might
find it challenging to implement custom features or modifications.
7. Privacy Concerns
Despite robust security measures, storing sensitive data online always carries a risk of data
breaches. Institutions must continuously monitor and enhance their security protocols to protect
against cyber threats and ensure compliance with data protection regulations.
1. Operating System
o Server: Linux (Ubuntu, CentOS, Debian), Windows Server, or macOS.
o Client: Any modern OS with a web browser (Windows, macOS, Linux).
2. Web Server
o Apache with mod_wsgi or Nginx with Gunicorn.
3. Database
o PostgreSQL, MySQL, or SQLite (for development and testing purposes).
4. Programming Languages
o Python 3.8 or higher.
5. Frameworks and Libraries
o Django 3.0 or higher.
o Django Rest Framework (DRF) for API development.
o Celery for asynchronous task management.
o Redis for caching and message brokering.
6. Frontend Technologies
o HTML, CSS, JavaScript.
o Bootstrap for responsive design.
7. Browser
o Any modern web browser (Google Chrome, Mozilla Firefox, Microsoft Edge, Safari).
7
o Git for version control.
o Virtual environment tools (venv or virtualenv) for managing Python dependencies.
o Docker (optional) for containerization.
o SSL/TLS certificates for secure HTTPS communication.
o SMTP server or email service (SendGrid, Mailgun, etc.) for email notifications.
1. Server Requirements
o Processor: Multi-core processor (2 cores minimum, 4 or more recommended).
o RAM: 4 GB minimum (8 GB or more recommended for better performance).
o Storage: SSD with a minimum of 50 GB free space (100 GB or more recommended,
depending on data volume).
o Network: High-speed internet connection with a stable and reliable bandwidth.
2. Client Requirements
o Processor: Any modern processor.
o RAM: 4 GB minimum (8 GB recommended).
o Storage: Minimum of 10 GB free space.
o Display: Monitor with a resolution of at least 1280x720 pixels.
o Network: Stable internet connection.
3. Backup and Redundancy
o External or cloud-based backup solutions to ensure data integrity and recovery.
o Redundant power supply and internet connection to minimize downtime.
8. Motivation
The motivation behind developing the Django School Management System stems from the pressing
need to streamline and automate the administrative and academic operations of educational
institutions. Traditional methods of managing student information, attendance, grades, schedules,
and communications are often time-consuming, error-prone, and inefficient. By leveraging modern
technologies and creating an integrated platform, this system aims to reduce administrative burdens,
enhance data accuracy, improve communication among stakeholders, and ultimately provide a more
efficient and user-friendly experience for administrators, teachers, students, and parents. This
holistic approach not only saves time and resources but also fosters a more organized and effective
educational environment.
9. Literature Review
8
to centralize data management, automate routine tasks, and facilitate real-time
communication (Al-Fedaghi, S., & Al-Huwail, A. 2016). Research indicates that
transitioning to digital systems significantly reduces administrative workload and enhances
operational efficiency (Karim, M. A., & Choudhury, S. 2020).
9
3. Open-Source School Management Systems
Open-source school management systems like Moodle, OpenSIS, and Fedena offer a more
customizable and cost-effective alternative to commercial software. These systems are
developed and maintained by communities of developers and offer a range of features that
can be tailored to specific institutional needs. However, they may require significant
technical expertise for customization and maintenance, and their support and documentation
can vary in quality.
4. Custom-Built Systems
Many educational institutions develop custom-built school management systems tailored to
their specific requirements. These systems are often created using various programming
languages and frameworks, and they offer the advantage of complete customization and
control over features and functionalities. However, custom development can be time-
consuming and costly, requiring ongoing support and maintenance from dedicated IT teams.
The proposed Django School Management System aims to revolutionize the way educational
institutions manage their administrative and academic operations by providing a comprehensive,
integrated platform. Built on the robust Django framework, this system offers a user-friendly
interface and powerful functionalities to streamline processes such as student information
management, attendance tracking, grade management, and communication. By automating routine
tasks and centralizing data, the proposed system enhances efficiency, reduces administrative burden,
and minimizes the risk of errors associated with manual record-keeping. Key features include a
customizable user management module, real-time attendance updates, automated grade
calculations, and a versatile communication module for seamless interaction among administrators,
teachers, students, and parents.
The system’s flexibility and scalability make it suitable for a wide range of educational institutions,
from small schools to large educational organizations. Its modular design allows for easy
customization and adaptation to specific institutional needs, ensuring that the system can grow and
evolve with the institution. The integration of advanced technologies such as Django Rest
Framework for API development and Celery for asynchronous tasks ensures that the system is both
robust and responsive. By addressing the limitations of existing systems such as high costs, lack of
customization, and integration challenges the proposed system provides a modern, efficient solution
that fosters a more organized and effective educational environment.
1. Django Framework
o Definition: A high-level Python web framework that simplifies the creation of robust,
scalable web applications by providing an automated admin interface, ORM (Object-
Relational Mapping), and various built-in features for security and performance.
10
2. School Management System (SMS)
o Definition: A digital platform designed to manage and streamline various administrative
and academic functions within educational institutions, including student information,
attendance, grades, schedules, and communication.
3. User Management
o Definition: A module within a software system that handles the creation, management, and
authentication of user accounts, including role-based access control to ensure that users
have appropriate permissions.
5. Grade Management
o Definition: A module for recording and managing student grades, including inputting
scores, calculating overall grades, and generating report cards.
8. Celery
o Definition: An asynchronous task queue/job queue based on distributed message passing,
used in conjunction with Django to handle background tasks and improve system
performance.
9. Redis
o Definition: An open-source, in-memory data structure store used as a database, cache, and
message broker, often employed to improve the speed and efficiency of web applications.
11
11. Bootstrap
o Definition: A popular front-end framework for developing responsive and mobile-first web
applications, providing pre-designed UI components and styles.
13. Implementation
2. Development
• Frontend Development: Create a responsive and user-friendly frontend using HTML, CSS,
JavaScript, and Bootstrap. Develop interfaces for various user roles (administrators, teachers,
students, parents) to interact with the system. Ensure that the frontend is intuitive and accessible
across different devices and browsers.
• Backend Development: Set up the Django project environment, including creating a virtual
environment and installing necessary dependencies. Develop core functionalities using Django,
such as user management, student information, attendance tracking, grade management, and
schedule management. Implement RESTful APIs using Django Rest Framework (DRF) for
integration with frontend and other systems.
12
• Integration: Integrate the frontend with the backend services. Implement features such as real-
time updates and notifications, and ensure smooth interaction between different system
components.
3. Testing
• Unit Testing: Perform unit testing of individual components and functionalities to ensure they
work correctly in isolation. Use Django’s built-in testing framework to automate and validate
backend logic.
• Integration Testing: Test the integration of different modules and components to ensure that they
work together as expected. Validate the data flow and communication between frontend and
backend.
• User Acceptance Testing (UAT): Conduct UAT with end-users (administrators, teachers, students,
and parents) to gather feedback and ensure that the system meets their needs and expectations.
Make necessary adjustments based on feedback.
• Test Results
The test results for the Django School Management System indicate that the application
successfully met the majority of its functional and performance criteria. Unit testing
confirmed that individual components, such as user management and attendance tracking,
performed as expected, with identified bugs promptly addressed. Integration testing showed
that the various modules integrated seamlessly, with no critical issues affecting data flow or
functionality. Performance testing demonstrated that the system handled expected loads
efficiently, with acceptable response times and resource usage. User Acceptance Testing
(UAT) revealed positive feedback from end-users, confirming that the system meets their
needs and operates intuitively. Overall, the test results affirm the system's readiness for
deployment, with a robust and user-friendly solution prepared for launch.
4. Deployment
• Server Setup: Choose a suitable hosting environment, such as cloud services (AWS, Heroku) or
on-premises servers. Configure the web server (Apache or Nginx) and database server
(PostgreSQL, MySQL).
• Deployment Process: Deploy the Django application to the chosen server. Set up environment
variables, configure settings for production, and implement security measures such as SSL/TLS
for HTTPS.
• Database Migration: Migrate the database schema to the production environment. Ensure that
data integrity is maintained and perform initial data population if necessary.
13
5. Training and Documentation
• User Training: Provide training sessions for administrators, teachers, and other users to familiarize
them with the system's functionalities and features. Create user manuals and training materials to
support ongoing learning.
• Documentation: Prepare comprehensive documentation covering system architecture, codebase,
API specifications, and user guides. Document the setup and deployment procedures for future
reference and maintenance.
1. Integration Issues
o Integrating the Django School Management System with existing systems or third-party
applications can pose challenges. Ensuring seamless data flow and compatibility between
various components often requires extensive testing and customization.
2. User Adoption
o Gaining user acceptance can be difficult, especially if users are accustomed to traditional
methods or other systems. Resistance to change and the learning curve associated with new
software can impact the successful adoption of the system.
3. Data Migration
o Migrating data from legacy systems or manual records to the new system can be complex
and time-consuming. Ensuring data accuracy and integrity during the migration process is
critical and may require significant effort to resolve inconsistencies.
4. Technical Issues
o Technical problems such as server downtime, bugs, or performance issues can affect the
system’s reliability and user experience. Maintaining system stability and addressing
technical issues promptly is essential for smooth operation.
5. Ongoing Maintenance
14
o Regular maintenance, including updates, security patches, and bug fixes, is necessary to
keep the system functioning optimally. Managing these tasks requires dedicated resources
and can be challenging, especially as the system evolves and grows.
15.1. Login.html
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>S.M.S | Log In</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Font Awesome -->
<link rel="stylesheet" href="{% static 'plugins/fontawesome-free/css/all.min.css' %}">
<!-- Ionicons -->
<link rel="stylesheet" href="{% static
'https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css' %}">
<!-- icheck bootstrap -->
<link rel="stylesheet" href="{% static 'plugins/icheck-bootstrap/icheck-bootstrap.min.css' %}">
<!-- Theme style -->
<link rel="stylesheet" href="{% static 'dist/css/adminlte.min.css' %}">
<!-- Google Font: Source Sans Pro -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700"
rel="stylesheet">
<!-- Google Recaptcha -->
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
</head>
15
</div>
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<!-- <p class="login-box-msg">Sign in to start your session</p> -->
{% if messages %}
<div class="col-12">
{% for message in messages %}
{% if message.tags == 'error' %}
<div class="alert alert-danger text-center ">
{{message }}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
<form action="doLogin/" method="post">
{% csrf_token %}
<div class="input-group mb-3">
<input required type="email" name='email' class="form-control"
placeholder="Email">
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-envelope"></span>
</div>
</div>
</div>
<div class="input-group mb-3">
<input required type="password" name='password' class="form-control"
placeholder="Password">
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-lock"></span>
</div>
</div>
</div>
<div class="input-group mb-3">
<div class="g-recaptcha" data-
sitekey="6LfswtgZAAAAAJ7bhwqZZtDpBsc75ekH6FWA4Fnt"></div>
</div>
<div class="row">
16
<div class="col-8">
<div class="icheck-primary">
<input type="checkbox" id="remember">
<label for="remember">
Remember Me
</label>
</div>
</div>
<!-- /.col -->
<div class="col-4">
<button type="submit" class="btn btn-success btn-block">Log In</button>
</div>
<p class="mb-1">
<a href="{% url 'password_reset' %}">Forgot Password?</a>
</p>
</div>
<!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
</body>
</html>
17
15.2. home_content.html:
{% extends 'main_app/base.html' %}
{% load static %}
{% block page_title %}{{page_title}}{% endblock page_title %}
{% block content %}
<section class="content">
<div class="container-fluid">
<!-- Small boxes (Stat box) -->
<div class="row">
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-info">
<div class="inner">
<h3>{{total_students}}</h3>
<p>Total Students</p>
</div>
<div class="icon">
<i class="nav-icon fas fa-user-graduate"></i>
</div>
<a href="{% url 'manage_student' %}" class="small-box-footer">More info <i
class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-success">
<div class="inner">
<h3>{{total_staff}}</h3>
<p>Total Staff</p>
</div>
<div class="icon">
<i class="nav-icon fas fa-users"></i>
</div>
<a href="{% url 'manage_staff' %}" class="small-box-footer">More info <i
class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
18
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-purple">
<div class="inner">
<h3>{{total_course}}</h3>
<p>Total Course</p>
</div>
<div class="icon">
<i class="nav-icon fas fa-th-list"></i>
</div>
<a href="{% url 'manage_course' %}" class="small-box-footer">More info <i
class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-danger">
<div class="inner">
<h3>{{total_subject}}</h3>
<p>Total Subjects</p>
</div>
<div class="icon">
<i class="nav-icon fas fa-book"></i>
</div>
<a href="{% url 'manage_subject' %}" class="small-box-footer">More info <i
class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
</div>
<!-- /.row -->
<!-- Main row -->
<div class="row">
<div class="col-md-6">
<!-- LINE CHART -->
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">Staffs - Students Overview</h3>
<div class="card-tools">
19
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i
class="fas fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-card-widget="remove"><i
class="fas fa-times"></i></button>
</div>
</div>
<div class="card-body">
<div class="chart">
<canvas id="pieChart" style="min-height: 250px; height: 250px; max-height:
250px; max-width: 100%;"></canvas>
</div>
</div></div>
<!-- /.card-body -->
</div>
<div class="col-md-6">
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">Attendance Per Subject</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas
fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fas
fa-times"></i></button>
</div>
</div>
<div class="card-body">
<div class="chart">
<canvas id="barChart" style="min-height: 250px; height: 250px; max-height: 250px;
max-width: 100%;"></canvas>
</div>
</div>
<!-- /.card-body -->
</div>
</div>
<!-- right col -->
</div>
<!-- /.row (main row) -->
<div class="row">
<div class="col-lg-12">
<!-- BAR CHART -->
20
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">Student's Attendance & Leave Overview</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas
fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fas
fa-times"></i></button>
</div>
</div>
<div class="card-body">
<div class="chart">
<canvas id="barChart2" style="min-height: 250px; height: 250px; max-height: 250px;
max-width: 100%;"></canvas>
</div>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<div class="col-lg-6">
</div>
</div>
<div class="row">
<div class="col-lg-6">
<!-- PIE CHART -->
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">Total Students in Each Course</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas
fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fas
fa-times"></i></button>
21
</div>
</div>
<div class="card-body">
<canvas id="pieChart2" style="min-height: 250px; height: 250px; max-height: 250px;
max-width: 100%;"></canvas>
</div>
<!-- /.card-body -->
</div>
</div>
<div class="col-lg-6">
<!-- PIE CHART -->
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">Total Students in Each Subject</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas
fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fas
fa-times"></i></button>
</div>
</div>
<div class="card-body">
<canvas id="pieChart3" style="min-height: 250px; height: 250px; max-height: 250px;
max-width: 100%;"></canvas>
</div>
<!-- /.card-body -->
</div>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
{% endblock content %}
{% block custom_js %}
<script>
$(document).ready(function(){
var donutData ={
labels: ['Students', 'Staff'],
datasets: [
{
22
data:[{{total_students}}, {{total_staff}}],
backgroundColor : ['#00a65a', '#f39c12',],
}
]
}
var pieChartCanvas = $('#pieChart').get(0).getContext('2d')
var pieData = donutData;
var pieOptions = {
maintainAspectRatio : false,
responsive : true,
}
//Create pie or douhnut chart
// You can switch between pie and douhnut using the method below.
var pieChart = new Chart(pieChartCanvas, {
type: 'pie',
data: pieData,
options: pieOptions
});
var barChartData = {
labels : subject_list,
datasets: [
{
label : 'Attendance Per Subject',
backgroundColor : '#17A2B8',
borderColor : 'rgba(60,141,188,0.8)',
pointRadius : false,
pointColor : '#3b8bba',
pointStrokeColor : 'rgba(60,141,188,1)',
pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(60,141,188,1)',
data : attendance_list
},
]
}
var barChartCanvas = $('#barChart').get(0).getContext('2d')
var temp0 = barChartData.datasets[0]
//var temp1 = areaChartData.datasets[1]
barChartData.datasets[0] = temp0
23
// barChartData.datasets[1] = temp0
var stackedBarChartOptions = {
responsive : true,
maintainAspectRatio : false,
scales: {
xAxes: [{
stacked: true,
}],
yAxes: [{
stacked: true
}]
}
}
//-------------
//- PIE CHART -
//-------------
// Get context with jQuery - using jQuery's .get() method.
var pieChartCanvas3 = $('#pieChart3').get(0).getContext('2d')
var pieData3 = pieData3;
var pieOptions3 = {
24
maintainAspectRatio : false,
responsive : true,
}
var areaChartData2 = {
labels : student_name_list,
datasets: [
{
label : 'Absent/Leave',
backgroundColor : '#b50a04',
borderColor : '#b50a04',
pointRadius : false,
pointColor : '#3b8bba',
pointStrokeColor : 'rgba(60,141,188,1)',
pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(60,141,188,1)',
data : student_attendance_leave_list
},
{
label : 'Attendance',
backgroundColor : '#5a615c',
borderColor : 'rgba(210, 214, 222, 1)',
pointRadius : false,
pointColor : 'rgba(210, 214, 222, 1)',
pointStrokeColor : '#c1c7d1',
pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(220,220,220,1)',
data : student_attendance_present_list
},
]
25
}
var barChartOptions2 = {
responsive : true,
maintainAspectRatio : false,
datasetFill : false
}
//-------------
//- PIE CHART -
//-------------
// Get context with jQuery - using jQuery's .get() method.
var pieChartCanvas2 = $('#pieChart2').get(0).getContext('2d')
var pieData2 = pieData2;
26
var pieOptions2 = {
maintainAspectRatio : false,
responsive : true,
}
})
</script>
{% endblock custom_js %}
15.3. admin_view_attendance.html:
{% extends 'main_app/base.html' %}
{% load static %}
{% block page_title %}{{page_title}}{% endblock page_title %}
{% block custom_css %}
<style>
.attendance_div_red{
padding: 10px;
background: #f44336;
border: 3px solid white;
text-align: center;
color: #fff;
border-radius: 30px;
box-shadow: 1px 1px 1px grey;
margin: 5px;
}
.attendance_div_green{
padding: 10px;
background: #4CAF50;
border: 3px solid white;
text-align: center;
color: #fff;
border-radius: 30px;
box-shadow: 1px 1px 1px grey;
margin: 5px;
}
27
</style>
{% endblock custom_css %}
{% block content %}
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<!-- general form elements -->
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">{{page_title}}</h3>
</div>
<div class="form-group">
<label>Subject</label>
<select name="subject" class="form-control" id='subject'>
<option value="">----</option>
{% for subject in subjects %}
<option value="{{subject.id}}">{{subject.name}}</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label>Session</label>
<select name="session" class="form-control" id='session'>
<option value="">----</option>
{% for session in sessions %}
<option value="{{session.id}}">{{session}}</option>
{% endfor %}
</select>
</div>
<div class="form-group"><div style="display: none;" class="alert alert-danger"
id='error_attendance'></div>
<div class="alert alert-success" id='success_attendance' style="display:
none;"></div>
<button type="button" id='fetch_attendance' class="btn btn-success btn-
block">Fetch Attendance</button>
28
</div>
<!-- /.card-body -->
</select>
</div>
<div class="form-group">
</div>
<div id='student_data' class="card-footer">
</div>
</div>
</div>
</div>
<!-- /.card -->
</div>
</div>
</div>
</section>
{% endblock content %}
{% block custom_js %}
<script>
$(document).ready(function () {
$("#fetch_attendance").click(function(){
var subject = $("#subject").val()
var session = $("#session").val()
$("#student_data").html("")
29
$("#attendance_block").hide()
$("#error_attendance").show()
return false
}
$.ajax({
url: "{% url 'get_attendance' %}",
type: 'POST',
data:{
subject:subject,
session:session
}
).done(function(response){
var json_data = JSON.parse(response)
if (json_data.length > 0){
}
}).fail(function(response){
alert("Error While Fetching Data")
$("#error_attendance").html("")
$("#error_attendance").show()
$("#attendance_block").hide()
$("#student_data").html("")
30
})
})
$("#fetch_student").click(function () {
var attendance_date = $("#attendance_date").val()
var session = $("#session").val()
var subject = $("#subject").val()
$("#student_data").html(null)
if (attendance_date.length == 0){
alert("Please Choose A Date");
$("#save_attendance").hide()
return false;
}
$.ajax({
url: "{% url 'get_admin_attendance' %}",
type: 'POST',
data: {
attendance_date_id:attendance_date,
session:session,
subject:subject
}
}).done(function (response) {
var json_data = JSON.parse(response)
if (json_data.length < 1) {
alert("No data to display")
} else {
31
// div_data += "<div class='col-lg-3'><div class='form-check custom-control
custom-checkbox'><input type='checkbox' class='custom-control-input' " +
(json_data[key]['status'] ? "checked='checked'" : "")+" name='student_data[]' value=" +
json_data[key]['id'] + " id='checkbox" + json_data[key]['id'] + "' /> <label for='checkbox" +
json_data[key]['id'] + "' class='custom-control-label'>" + json_data[key]['name'] +
(json_data[key]['status'] ? " [Present] " : " [Absent] ")+"</label></div> </div>"
div_data += "</div></div>"
$("#student_data").html(div_data)
}
}).fail(function (response) {
alert("Error in fetching students")
})
})
})
</script>
{% endblock custom_js %}
15.4. student_view_attendance.html:
{% extends 'main_app/base.html' %}
{% load static %}
{% block page_title %}{{page_title}}{% endblock page_title %}
{% block custom_css %}
<style>
.attendance_div_red{
padding: 10px;
background: #f44336;
border: 3px solid white;
text-align: center;
color: #fff;
border-radius: 30px;
box-shadow: 1px 1px 1px grey;
margin: 5px;
}
.attendance_div_green{
padding: 10px;
background: #4CAF50;
border: 3px solid white;
text-align: center;
color: #fff;
32
border-radius: 30px;
box-shadow: 1px 1px 1px grey;
margin: 5px;
}
</style>
{% endblock custom_css %}
{% block content %}
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<!-- general form elements -->
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">{{page_title}}</h3>
</div>
<!-- /.card-header -->
<!-- form start -->
<div class="card-body">
<div class="form-group">
<label>Select Subject</label>
<select id="subject" class="form-control">
<option value="">----</option>
{% for subject in subjects %}
<option value="{{subject.id}}">{{subject.name}} </option>
{% endfor %}
</select>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label>Start Date</label>
<input type="date" class="form-control" placeholder="Start Date"
name="start_date" required id="start_date">
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label>End Date</label>
33
<input type="date" class="form-control" placeholder="End Date"
name="end_date" id="end_date">
</div>
</div>
<button type="button" id="fetch_attendance" class="btn btn-success btn-
block">Fetch Attendance Data</button>
</div>
</div>
<!-- /.card-body -->
<div class="card-footer">
</div>
</div>
</div>
</section>
{% endblock content %}
{% block custom_js %}
<script>
$(document).ready(function () {
$("#fetch_attendance").click(function () {
var subject = $("#subject").val()
var start_date = $("#start_date").val()
var end_date = $("#end_date").val()
if (subject.length == 0 || end_date.length ==0 ||start_date.length == 0){
alert("Please Select Subject and Date Range");
return false;
}
$("#attendance_data").html(null)
$.ajax({
url: "{% url 'student_view_attendance' %}",
type: 'POST',
data: {
subject: subject,
34
start_date: start_date,
end_date:end_date
}
}).done(function (response) {
var json_data = JSON.parse(response)
if (json_data.length < 1) {
$("#attendance_data").html("<div class='col-md-12 alert alert-danger'>No Data For
Specified Parameters</div>")
} else {
var div_data = ""
}
}).fail(function (response) {
$("#attendance_data").html("Error While Fetching Records")
})
})
})
</script>
{% endblock custom_js %}
15.5. staff_take_attendance.html:
{% extends 'main_app/base.html' %}
{% load static %}
{% block page_title %}{{page_title}}{% endblock page_title %}
{% block content %}
<section class="content">
<div class="container-fluid">
35
<div class="row">
<div class="col-md-12">
<!-- general form elements -->
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">{{page_title}}</h3>
</div>
<div class="form-group">
<label>Subject</label>
<select name="subject" class="form-control" id='subject'>
<option value="">----</option>
{% for subject in subjects %}
<option value="{{subject.id}}">{{subject.name}}</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label>Session Year</label>
<select name="session" id='session' class="form-control">
<option value="">----</option>
{% for session in sessions %}
<option value="{{session.id}}">{{session}} </option>
{% endfor %}
</select>
</div>
{% comment %}
<div>
<label>Attendance Date</label>
<input type="date" class='form-control' name="attendance_date"
id='attendance_date' id="">
</div>
{% endcomment %}
</div>
<!-- /.card-body -->
36
<div class="card-footer">
<button type="button" id='fetch_student' class="btn btn-success btn-block">Fetch
Students</button>
<div class="form-group" id="student_data">
</div>
</div>
</div>
<!-- /.card -->
</div>
</div>
</div>
</section>
{% endblock content %}
{% block custom_js %}
<script>
$(document).ready(function () {
$("#fetch_student").click(function () {
var subject = $("#subject").val()
var session = $("#session").val()
$("#student_data").html(null)
if (subject.length == 0 || session.length == 0){
alert("Please select session and subject");
return false;
}
$.ajax({
url: "{% url 'get_students' %}",
type: 'POST',
data: {
subject: subject,
session: session
}
}).done(function (response) {
var json_data = JSON.parse(response)
if (json_data.length < 1) {
alert("No data to display")
} else {
37
var div_data = "<hr/><div class='form-group'></div><div class='form-group'>
<label>Attendance Date</label><input type='date' class='form-control' name='attendance_date'
id='attendance_date' ><div class='row'>"
}
return {'id':$(this).val(), 'status': 0};
}).get()
var attendance_date = $('#attendance_date').val()
if (attendance_date.length < 10){
alert("Select date")
return false;
}
student_data = JSON.stringify(student_data)
$.ajax({
url: "{% url 'save_attendance' %}",
type: 'POST',
data: {
date: attendance_date,
student_ids: student_data,
38
subject: subject,
session: session
}
}).done(function (response) {
if (response == 'OK'){
alert("Saved")
}else{
alert("Error. Please try again")
}
location.reload()
}).fail(function (response) {
alert("Error in saving attendance")
})
})
})
})
</script>
{% endblock custom_js %}
39
16. Results:
Fig 1: Login Page
40
Fig 3: Admin Dashboard
41
Fig 6: Notify Staff
42
Fig 7: View Attendance
43
Fig 10: Upload Result
44
Fig 12: Student Panel
45
Fig 14: Apply for Leave
46
17. Conclusion:
The Django School Management System represents a significant advancement in the realm of
educational administration. By consolidating various administrative and academic functions into a
single, unified platform, it offers a comprehensive solution that addresses the needs of educational
institutions. The system’s design ensures that it enhances administrative efficiency by automating
routine tasks, streamlining student and staff management, and facilitating effective communication
between all stakeholders. The integration of modules for student information, attendance
management, grading, and scheduling ensures that every aspect of school management is handled
efficiently and accurately.
Furthermore, the system contributes to a more organized and creative educational environment by
providing tools that support both educators and students. Teachers can manage their classes, track
student progress, and communicate with parents through an intuitive interface, while students
benefit from features that allow them to view their grades, track their attendance, and apply for
leave with ease. The inclusion of graphical representations and data visualization tools also aids in
better understanding and analyzing academic performance and administrative metrics, enabling
data-driven decision-making.
In essence, the Django School Management System not only simplifies the complex processes
involved in managing an educational institution but also fosters a more engaging and productive
learning environment. Its modular approach and user-friendly design make it an ideal solution for
47
schools aiming to modernize their operations and improve overall efficiency. By integrating
advanced technology with practical features, this system sets a new standard for school management
software, paving the way for more innovative and effective educational practices.
48