Final Document
Final Document
The Student CGPA (Cumulative Grade Point Average) Calculator is a web application
developed with the Django framework, designed to assist students in managing their academic
records efficiently. This application enables users to register, log in, and securely manage their
subjects, grades, and credits.
By leveraging Django’s robust authentication system, the platform ensures that each
user’s data remains private and accessible only to them.
As users input grades and corresponding credits, the CGPA is calculated dynamically
using a predefined formula, providing instant feedback on academic performance.
Form validation is integrated to ensure that only valid data is submitted, with error
messages guiding users in correcting any mistakes. The user interface is designed for
responsiveness, utilizing Bootstrap to provide a seamless experience across devices, from
desktops to mobile phones.
This functionality is beneficial for students seeking to maintain a hard copy of their
performance for personal reference or submission to external parties.
Overall, the CGPA Calculator is a user-friendly tool that enhances the academic
experience, enabling students to track and manage their performance effectively.
1
INTRODUCTION
This project is a Django web-based Student Cumulative Grade Point Average (CGPA)
calculator designed specifically for students, enabling them to efficiently manage their subjects,
grades, and credit hours. Built with Django 5.1, the application is structured around models,
views, and templates, ensuring a robust and scalable platform. At its core is the Subject model,
which encapsulates essential details like subject name, grade, and credit hours, and employs a
foreign key to link each subject to a specific user.
User authentication is a critical aspect, providing a secure environment for data
management, with functionalities for registration and login that protect user information and
ensure that students can access and modify their records independently.
Once logged in, users can perform various CRUD operations on their subjects. The
application offers an intuitive interface for adding new subjects, allowing users to input
relevant details, which are crucial for accurate CGPA calculation. Users can easily create new
entries, view their existing subjects, edit grades or credit hours as needed, and delete subjects
they no longer wish to track.
The application’s primary feature is its ability to calculate CGPA based on the entered
grades and credit hours, utilizing a predefined mapping of letter grades to numeric values. This
function allows students to monitor their academic performance effectively over time.
Overall, this project provides a comprehensive solution for students to manage their
academic records effectively while maintaining security and data integrity.
2
OBJECTIVE OF THE PROJECT
This Django project aims to create a comprehensive platform for students to efficiently
manage their academic records, with a primary focus on subject tracking and Cumulative Grade
Point Average (CGPA) calculation. The application is designed to facilitate the addition,
editing, and deletion of subjects, along with their corresponding grades and credit hours.
This real-time calculation provides valuable insights into students' academic progress,
enabling them to understand their performance better and make informed decisions about their
studies. As students add new subjects or modify existing entries, the application immediately
updates the CGPA, ensuring users always have access to their current academic standing.
3
1.SYSTEM SPECIFICATION
Platform : Windows 11
RAM :8 GB
Design : Bootstrap
HTML stands for HyperText Markup Language.HTML is used to create web pages and
web applications.HTML is widely used language on the web.We can create a static website by
HTML only.Technically, HTML is a Markup language rather than a programming
language.HTML stands for HyperText Markup Language and is used to create content and
structure of any web page. It is the building block of web pages.
4
KEY COMPONENTS OF HTML
1. Tags: HTML tags are the building blocks of HTML documents. Tags like <h1>
(header), <p> (paragraph), and <a> (anchor for links) are used to format and organize
content. Most tags come in pairs with an opening tag (<p>) and a closing tag (</p>).
2. Attributes: HTML tags can have attributes that provide additional information about
the element. For example, the <img> tag, used to insert images, uses the src attribute to
define the image source: <imgsrc="image.jpg" alt="description">.
3. Elements: An element consists of an opening tag, content, and a closing tag. For
example, <p>This is a paragraph.</p> is a paragraph element. Some elements, like
<img>, are self-closing and don’t have content or a closing tag.
4. Document Structure: A basic HTML document starts with <!DOCTYPE html>,
followed by the <html> element, which contains the entire document. The document is
divided into two main sections:
CSS3
CSS, or Cascading Style Sheets, is the language used to style and enhance HTML
documents. It defines the presentation of HTML elements on a web page, enabling changes
to fonts, colors, sizes, spacing, column layouts, and animations.It controls how HTML
elements—such as text, images, and buttons—are displayed on a webpage. With CSS, you
can adjust font sizes and colors, add backgrounds, and manage the layout, transforming a
basic webpage into a visually appealing and user-friendly experience. CSS also
simplifies layout management across multiple web pages by using external stylesheets stored
in CSS files.Different Ways to Use CSS .CSS has three ways to style the HTML:
Inline: Add styles directly to HTML elements using the style attribute (limited
use).
Internal: Place styles within a <style> tag inside the HTML file, usually within
the <head> section
External: Create a separate CSS file with a .css extension and link it to your
HTML file using the <link> tag.
5
CSS FEATURES
As you conquer the basics, explore these powerful features to elevate your web design:
Media Queries: Tailor website layouts for different screen sizes, ensuring optimal
viewing experiences across devices.
CSS Grid and Flexbox: Revolutionize website layouts with these frameworks for
creating complex and responsive designs.
CSS Animations and Transitions: Add interactivity and visual flair to your
webpages with smooth animations and transitions.
Django is a high-level, open-source web framework written in Python that enables rapid
development of secure and scalable web applications. It follows the Model-View-Template
(MVT) architectural pattern, which helps separate the business logic, user interface, and data
management. Django comes with built-in features like an admin panel, authentication system,
ORM (Object-Relational Mapping) for database interactions, and form handling, which allows
developers to build web applications faster while following best practices.
FEATURES OF DJANGO
Versatile which allows us to develop any kind of web page.
It is scalable
It is extremely fast.
Secure thereby helping developers.
It comes along with content administrations, authentications.
6
PYTHON
FEATURES OF PYTHON:
Dynamically Typed - The data types of variables are determined during run-time.
We do not need to specify the data type of a variable during writing codes.
High-level - High-level language means human readable code.Compiled and
Interpreted - Python code first gets compiled into bytecode, and then interpreted
line by line.
Garbage Collected - Memory allocation and de-allocation are automatically
managed. Programmers do not specifically need to manage the memory.
Purely Object-Oriented - It refers to everything as an object, including numbers and
strings.
Rich Standard Library - Python comes with several standard libraries that provide
ready-to-use modules and functions for various tasks, ranging from web
development and data manipulation to machine learning and networking.
7
2.SYSTEM STUDY
The existing CGPA calculator system provides basic functionalities such as adding,
editing, and deleting subjects, calculating CGPA, and user authentication. However, it lacks
customization options, advanced features, and a user-friendly interface.
Limited Customization: It doesn't allow users to customize the grade point scale or
implement a weighted credit system. This limits its applicability to different educational
systems and grading standards.
Limited User Interface: The interface might not be user-friendly or responsive to
different devices, making it difficult to use on various platforms.
Data Management Issues: There might be limitations in exporting or importing data,
making it difficult to transfer data between devices or share it with others.
No Offline Functionality: The system might require an internet connection to function,
limiting its usability in certain scenarios.
Limited Integration: It might not integrate with other educational tools or platforms,
such as learning management systems (LMS).
8
2.3 PROPOSED SYSTEM
Ensure the calculator is accessible and usable on various devices (desktop, tablet,
mobile) by implementing responsive design principles.Adapt the layout and elements to fit
different screen sizes. Use clear and concise language in the interface.Allow users to export
their data (subjects, grades, CGPA) to a CSV or PDF file. Provide an option to import data
from a file for easy data entry or transfer between devices.
Use intuitive icons and symbols for actions.Consider implementing offline
functionality, allowing users to use the calculator without an internet connection.Store data
locally and sync it with the server when an internet connection is available.
Allow users to customize the grade point scale used for calculations. This would
accommodate different educational systems or grading standards.
Provide pre-defined options for common grading systems (e.g., GPA 4.0, CGPA 10)
and a custom option for users to enter their own scale.
Real-Time CGPA Calculation: Users can instantly see their CGPA update as they
enter or modify their grades and credits, providing immediate feedback on their
academic performance.
Data Visualization: The integration of charts and graphs helps users visualize their
grades and credits effectively, making it easier to understand their academic
standing and trends over time.
Secure User Authentication: The system employs secure user authentication,
ensuring that personal data is protected and only accessible to the authorized user.
Grade Management: Users can manage their subjects and grades systematically,
allowing for better organization and tracking of academic progress.
9
3.SYSTEM DESIGN
This project is a Student CGPA (Cumulative Grade Point Average) calculator built using
the Django framework. The primary goal of the project is to allow students to manage their
subjects, input their grades, and calculate their overall CGPA based on the entered grades and
corresponding credits.
The User Authentication have Registration, Login, and Logout: The platform allows
users to create their accounts, log in, and log out securely. This ensures that each user has a
personalized experience where their subjects and CGPA calculations are private and tied to
their account. Security: Django's built-in authentication system handles user sessions and
passwords securely by using hashed passwords, making sure sensitive information is protected.
User-Specific Data: Only logged-in users can manage their subjects and perform calculations,
ensuring that the data is tied to individual users and cannot be accessed by others.
The Subject Management have CRUD Operations (Create, Read, Update, Delete):
Users can perform all the basic actions needed to manage their academic records. Add
Subjects: Users can add new subjects, providing the subject name, the grade they received, and
the credits assigned to the subject.Edit Subjects: If users want to correct any information or
change the grade/credits for a subject, they can easily update it. Delete Subjects: In case a
subject is no longer relevant, or added by mistake, users can remove it. Grade and Credit Data:
The application uses this data to perform the CGPA calculations dynamically, so accuracy is
important. The Dynamic CGPA Calculation have Automatic Calculation: As soon as the user
inputs grades and credits for all their subjects, the app dynamically calculates the CGPA based
on the formula:
10
The system applies a predefined grade-point mapping (e.g., A = 10, B = 8, etc.),
multiplying each grade's corresponding grade points with the subject's credit value. This sum
is divided by the total number of credits to calculate the CGPA.
The Form Validation have Django Form Handling: The application uses Django’s form
system, which ensures that all inputs are validated before being processed. For example:
Grade Validation: Ensures that only valid grades (e.g., A, B, C) are entered.Credit
Validation: Ensures credits are numerical and within a valid range (e.g., between 1 and 5
credits).Empty Fields: Users can’t submit forms with missing information, preventing errors
during CGPA calculation. Error Handling: If the user inputs invalid data, Django provides
helpful error messages that guide the user in correcting their input. The Responsive Design
have Mobile and Desktop Compatibility: The user interface is built with responsiveness in
mind, using Bootstrap or other CSS frameworks to ensure that the layout adapts to different
screen sizes. User Experience (UX): The design is optimized so that users on mobile devices
or tablets can easily interact with the application without any need for zooming in or scrolling
unnecessarily. The forms, buttons, and text fields are designed to be accessible and easy to use
on both smaller and larger screens.
The Printable Report have Generating Reports: The system allows users to export a
summary of their subjects, grades, credits, and CGPA. This can be done using either a
downloadable PDF or a printable HTML page.Format: The report is neatly formatted to display
all the essential information such as:A list of all subjects.The corresponding grades and credits.
The overall calculated CGPA Usage: This feature is useful for students who want a hard
copy of their performance report, either for their own reference or to submit to others .
MODULES
Admin Panel
User Authentication
Subject Management
CGPA Calculation
Form Validation
Responsive Design
Printable Report
11
3.2 MODULES OF THE PROJECT
Admin Panel
User Authentication
It ensures secure access, allowing users to create accounts, log in, and manage their
personal data while safeguarding sensitive information.
Subject Management
This feature enables users to add, edit, and delete subjects along with their respective
grades and credits, fostering better organization of academic information. Enable users to add,
edit, delete, and view subjects with relevant details.
Subject Model: Stores subject information like name, grade, and credits.
Add Subject View: Allows users to add new subjects.
Edit Subject View: Lets users modify existing subject details.
Delete Subject View: Enables users to remove subjects from their list.
List Subject View: Displays all subjects the user has entered.
CGPA Calculation
12
Grade Point System: Maps grades to corresponding grade points (e.g., A = 10, B =
8).
Calculation Function: A backend function that calculates the CGPA using the
formulaCGPA=∑(GradePoints×Credits)/∑Credits
Real-Time Calculation: Automatically updates the displayed CGPA whenever
subjects or grades are added/modified.
Form Validation
Form Validation is implemented to ensure all input is accurate and complete before
submission. Ensure the data entered by users is valid and follows the correct format.
Subject Form: A Django form used to enter subjects, grades, and credits, with
validation rules for each field.
Subject Name: Must not be blank.
Grade: Must be a valid grade (e.g., A, B, C).
Credits: Must be a positive number.
Responsive Design
CSS Framework (e.g., Bootstrap): Provides responsive grid layout, forms, and
buttons for optimal mobile and desktop experience.
Media Queries: Used to adjust styles like font sizes, padding, and layouts based on
the screen size.
Printable Report
The Printable Report feature allows users to generate and print a comprehensive report
of their academic performance, providing a tangible summary of their achievements for
personal records or submission to educational institutions.Generate and display a printable
report of the user’s subjects and calculated CGPA.
13
Report View: Generates a list of subjects, grades, credits, and the final CGPA in a
print-friendly format.
Print Stylesheet: Special CSS to ensure the report is formatted correctly for
printing.
Export Options: Provides options for exporting as PDF or printing directly from
the browser.
Uses Django templates, HTML, and CSS for layout, and may use libraries like
xhtml2pdf for generating PDFs.
Input design in the proposed system is crucial for ensuring a smooth and user-friendly
experience when interacting with the application. It focuses on how users enter data and how
that data is validated and processed.
User Authentication: The login and registration forms feature clearly labeled fields for
usernames and passwords. Input validation checks for existing usernames during registration
and enforces password strength for security.
Subject Management: Users can add or edit subjects through a form that includes fields for
subject name, grade, and credit hours. Each field is equipped with input constraints, such as
character limits for the subject name and dropdown options for grades, minimizing the risk of
errors.
CGPA Calculation: Users input their grades and credits for each subject in structured tables.
This setup allows for easy addition or removal of subjects. Automatic updates to the CGPA
calculation occur as users modify their inputs, providing immediate feedback.
Form Validation: Each input form includes real-time validation to ensure that required fields
are filled out correctly before submission. For example, if a user tries to submit a subject
without entering a grade or credit, a clear error message prompts them to correct the input.
Responsive Design: Input fields are designed to be accessible on various devices, ensuring
users can input data easily on smartphones, tablets, or desktops.
14
3.4 OUTPUT DESIGN
Output design in the proposed system is centered around presenting the results of user
interactions in a clear, informative, and visually appealing manner. This design aspect focuses
on how data is displayed after users input their information, particularly in relation to CGPA
calculations and subject management.
CGPA Results: After users enter their subjects and grades, the system calculates the CGPA
and presents it prominently on the results page. This display includes a clear breakdown of the
total credits, grade points, and the final CGPA, ensuring users can easily understand their
academic performance.
Subject Overview: The output design features structured tables that list all subjects entered by
the user, including columns for subject name, grade, credit hours, and actions (edit/delete).
This organized format allows users to quickly review their data and make necessary
adjustments.
Printable Reports: The output design allows users to generate a printable report of their
academic performance. This report consolidates all entered data, CGPA calculations, and
visualizations into a well-structured format that can be easily printed or saved as a PDF for
sharing or personal records.
Responsive Display: All output elements are designed to be responsive, ensuring that
information is presented clearly across different devices. Whether on a desktop, tablet, or
smartphone, users will have a consistent experience viewing their results.
15
3.5 SYSTEM FLOW DIAGRAM
User
Login
Register
Access
pages
Views
Login/Register
Login page
Register page
CGPA Calculator page
Results page
AuthSystem
Add/Edit/Delete
subjects
Authenticate user
SubjectManager Show CGPA
Logout user
Calculation
Add Subject
Edit Subject
Delete Subject
Calculate CGPA
16
3.6 USECASE DIAGRAM
Login Register
Admin CGPA User
Calculator
17
Dataflow Diagram : LEVEL 1
User
User Authentication
Subject Management
CGPA Calculator
Calculate CGPA
Result Generation
18
Dataflow Diagram -LEVEL 2
user
User Authentication
Subject Management
Login Register
CGPA Calculator
Result Generation
19
4.IMPLEMENTATION AND TESTING
First, utilize environment variables for sensitive configuration settings, such as your
secret key and database credentials, using packages like python-decouple.
This practice helps protect sensitive information and allows for easier configuration
changes across environments. Next, improve user authentication by integrating Django’s
built-in authentication views, which provide password reset functionality.
Enhance user interaction with JavaScript, particularly for features like receipt
generation. Implementing a function to print receipts directly can streamline the user
experience.
20
File structure of the project:
21
4.2 TESTING APPROACH
1. Unit Testing:
Unit testing is a software testing methodology focused on verifying the smallest testable
parts of an application, known as units.
Models: The Subject model and its fields (name, grade, credit, user) should be tested
independently. Unit tests can be written to validate that the model saves correctly,
respects field constraints, and handles edge cases (e.g., a missing user, invalid grade,
or credit).
Forms: The SubjectForm should be unit tested to ensure form validation works
correctly (e.g., valid input for grades and credits).
Views: Each view function can be tested individually. For example:
Test that the cgpa_calculator view returns the correct context variables
(subjects, form, cgpa).
Test that the edit_subject, delete_subject, and result views handle HTTP
methods (GET/POST) appropriately.
1. Integration Testing:
Test the interaction between models, views, and templates. For instance, when
a subject is added via the form, ensure that it is saved in the database and
reflected on the page when the user revisits the CGPA calculator.
Integration tests also validate that the login and registration processes interact
smoothly with the Django authentication system.
22
2. Functional Testing:
Functional testing ensures that the application properly satisfies the requirements
or specifications.
TEST CASE
Input user: valid User object, name: "Mathematics", grade: "A", credit: 3
Here the project is set up by installing Django, creating a project, and an app to handle
the CGPA logic. Models are then defined to represent students and their subjects, each with
attributes like credit hours and grade points. These models form the basis of the database. Next,
views are implemented to handle CGPA calculations, where the total grade points are divided
by the total credit hours to compute the CGPA, which is then displayed to the user.
The app’s URLs are mapped to link the views to specific web pages, and a simple
template is created to show the CGPA results in the browser. After this, migrations are run to
set up the database tables, and the models are registered in Django’s admin panel for easy data
management. The project is tested locally using Django’s development server, and once
23
functioning correctly, it is prepared for deployment by configuring a production server (like
Gunicorn) and collecting static files. Finally, after deploying the app, regular maintenance tasks
like updating dependencies and backing up the database are ensured for smooth system
performance.
User logs in, adds subject details using the form (name, grade, and credit).
CGPA is calculated by summing the weighted grades and dividing by the total
credits.
Results are displayed in a table with the final CGPA.
System maintenance for the CGPA Calculator application built with Django involves
several key tasks to ensure the app runs smoothly, securely, and efficiently. First, it is essential
to keep the Django framework and third-party libraries updated with the latest versions to patch
any security vulnerabilities. Regularly checking the database for integrity, cleaning up unused
records, and optimizing queries can help improve performance, especially as the number of
subjects and users grows.
Periodically reviewing and updating the code to ensure that features like user
authentication, form handling, and grade calculations work correctly is important for
maintaining functionality. Additionally, implementing logging and monitoring for errors and
user activities helps detect issues early and ensure the app is running as expected. Backing up
the database and ensuring proper storage and handling of user credentials is crucial for data
security. Finally, testing after updates or changes to the code ensures that the application
remains functional and reliable for users. Regular maintenance not only ensures a smooth user
experience but also enhances security and performance for the long term.
24
5. PROJECT EVALUATION
The current Django CGPA calculator code exhibits several limitations that could affect
its usability, security, and overall performance. Firstly, security is a significant concern,
particularly with the exposure of sensitive information such as the SECRET_KEY. This key
should remain confidential in a production environment to prevent unauthorized access.
Additionally, the application runs with DEBUG set to True, which is appropriate for
development but poses a risk in production, as it can reveal detailed error messages that may
expose vulnerabilities.
User authentication is another area that requires improvement. The system currently lacks
robust password policies, allowing for weak passwords that could compromise user accounts.
Furthermore, the feedback provided during the login process is minimal, with users receiving
vague messages regarding authentication failures. This could lead to confusion, particularly for
new users. Implementing more descriptive error messages and enforcing stronger password
requirements would enhance security and user experience.
Data integrity is another limitation, especially regarding the handling of subject entries. The
application does not prevent users from entering duplicate subjects, which could result in
conflicting data and make it challenging to accurately calculate CGPA. Implementing checks
to identify duplicates before saving entries would improve the integrity of the data being
processed.
The user interface, while functional, could benefit from significant improvements. For
example, form validation messages are not prominently displayed, which may lead users to
submit forms without realizing there are errors. Enhancing the clarity and visibility of these
messages would make the application more user-friendly. Moreover, the navigation between
different pages and functionalities could be streamlined to create a more intuitive user
experience.
25
In terms of performance, the application currently retrieves all subject entries from the database
without pagination. As the number of subjects grows, this could lead to slower response times
and a less efficient user experience. Implementing pagination or lazy loading techniques would
help manage larger datasets more effectively, ensuring that users can interact with the
application without delays.
The architecture of the application also poses challenges for maintainability. The business logic
is tightly coupled with the view functions, which makes the codebase harder to manage and
test. Separating concerns by moving business logic to service layers or utility functions could
lead to a cleaner and more modular design. This would not only facilitate easier updates and
testing but also make the codebase more understandable for new developers.
Furthermore, the application lacks comprehensive documentation and comments. This absence
makes it difficult for other developers to understand the code or contribute to its improvement.
Proper documentation outlining the architecture, functionalities, and usage of the application
would enhance collaboration and reduce onboarding time for new developers.
Lastly, the current implementation does not support advanced features such as downloadable
reports or data import/export functionalities. These features could significantly enhance user
engagement and utility, particularly for students looking to maintain records of their academic
performance. Including options for generating reports in various formats would broaden the
application’s usability.
26
5.2 FURTHER SCOPE OF PROJECT
Implement a user profile model that stores additional user information (e.g., full name,
email, program of study). Allow users to update their profiles.
Visual Representation:
Use libraries like Chart or Plot to visualize the CGPA trend over semesters or years.
Generate reports in various formats (PDF, Excel) for user download.
Data Export:
Allow users to export their grades and CGPA calculations to CSV or JSON formats for
use in other applications.
Feedback System:
27
6.CONCLUSION AND SCREENSHOTS
6.1 CONCLUSION
This application serves as a practical tool for students to keep track of their academic
performance and calculate their CGPA. It incorporates fundamental Django features such as
models, forms, views, and templates, demonstrating a well-structured web application with
user authentication and data management capabilities.
The Django application is a CGPA calculator that allows users to manage their subjects,
calculate their GPA based on grades and credits, and handle user authentication (registration,
login, and logout). It utilizes models, forms, and views to provide a functional interface for
students to track their academic performance.
The application is structured with best practices in mind, making it a practical tool for academic
management. Future enhancements could focus on security improvements and additional
features for a more comprehensive user experience. this Django-based CGPA calculator is a
functional, user-friendly tool that empowers students to manage their academic records
efficiently. By combining user authentication, subject management, and CGPA calculation, the
application addresses a critical need in student life.
28
6.2 BIBLIOGRAPHY
Book References
Website
https://www.tutorialspoint.com/html/index.htm
https://www.geeksforgeeks.org/css-tutorial/
https://www.javatpoint.com/python-tutorial
29
6.3 SOURCE CODE
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFsp
d3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title>CGPA Calculator</title>
</head>
<body>
<br>
<br>
<br>
<div class="container mt-4 bg-white col-md-3 card shadow p-3 " id="log">
<div class="login-form">
{% if messages %}
30
{{ message }}
</div>
{% endfor %}
{% endif %}
{% csrf_token %}
<div class="form-group">
</div>
</div>
</div>
<br>
</form>
31
<p class="text-center" style="color: #555;"><a href="{% url 'register' %}" style="color:
#007bff;">Create an Account.</a></p>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CGPA Calculator</title>
</head>
<style>
body {
margin: 20px;
#calculator {
max-width: 600px;
margin: 0 auto;
padding: 20px;
border-radius: 5px;
32
h1{
color: #333;
text-align: center;
form {
margin-bottom: 20px;
button {
padding: 10px;
color: black;
border: none;
font-size: 13px;
font-weight: bold;
border-radius: 3px;
cursor: pointer;
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
th, td {
33
padding: 10px;
text-align: left;
th {
background-color: #d9dad9d7;
#cgpa {
font-weight: bold;
a{
color: black;
</style>
<body>
<div id="calculator">
<br>
{% csrf_token %}
{{form.as_p}}
34
</form>
<br>
<table>
<thead>
<tr>
<th>Subject</th>
<th>Grade</th>
<th>Credit</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
</td>
</tr>
{% endfor %}
</tbody>
35
</table>
</div>
<br>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<style>
body {
margin: 20px;
#calculator {
max-width: 400px;
margin: 0 auto;
padding: 20px;
36
border: 1px solid #ccc;
border-radius: 5px;
h2 {
button {
padding: 10px;
color: black;
border: none;
font-size: 13px;
font-weight: bold;
border-radius: 3px;
cursor: pointer;
a{
color: black;
</style>
<div id="calculator">
<br>
<br>
37
<form method="post" action="{% url 'edit_subject' subject_id=subject_id %}">
{% csrf_token %}
{{ form.as_p }}
</form>
<br>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CGPA Calculator</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.4.0/jspdf.umd.min.js"></script>
</head>
<style>
body {
margin: 20px;
38
.calculator {
max-width: 600px;
margin: 0 auto;
padding: 20px;
border-radius: 5px;
form {
margin-bottom: 20px;
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
th,
td {
padding: 10px;
text-align: left;
th {
39
#cgpa {
font-weight: bold;
button {
padding: 10px;
color: black;
border: none;
font-size: 13px;
font-weight: bold;
border-radius: 3px;
cursor: pointer;
margin-left:655px
</style>
<body>
<br>
<br>
<table>
<thead>
<tr>
<th>Subject</th>
<th>Grade</th>
40
<th>Credit</th>
</tr>
</thead>
<tbody>
<tr>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<br>
<script type="text/javascript">
function myfun(pa) {
let d = document.getElementById(pa).innerHTML;
document.body.innerHTML = d;
41
window.print();
</script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFsp
d3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title>CGPA Calculator</title>
</head>
<body>
<body>
<br><br><br><br>
<div class="login-form">
{% if messages %}
42
<div class="alert alert-success {{ message.tags }}" role="alert" >
{{ message }}
</div>
{% endfor %}
{% endif %}
{% csrf_token %}
<div class="form-group">
</div>
</div>
</div>
<br>
</form>
</div>
43
</div>
</body>
</html>
44
6.4 SCREENSHOTS AND REPORTS
45
Figure 3 : Admin Logout page
46
Figure 5 : User Login page
47
Figure 7 : Edit page
48
Figure 9 : Print page
49