0% found this document useful (0 votes)
77 views9 pages

2 April2023

This document summarizes a student paper on developing a library management system using the Django web framework in Python. The system allows administrators to manage library resources and students to view borrowed books. It reduces manual work and record keeping. The system has four modules: books, authors, borrowers, and lending details to manage relevant information. The methodology involved defining requirements, designing the database schema, and using the Model-View-Template pattern in Django for rapid development and scalability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views9 pages

2 April2023

This document summarizes a student paper on developing a library management system using the Django web framework in Python. The system allows administrators to manage library resources and students to view borrowed books. It reduces manual work and record keeping. The system has four modules: books, authors, borrowers, and lending details to manage relevant information. The methodology involved defining requirements, designing the database schema, and using the Model-View-Template pattern in Django for rapid development and scalability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

High Technology Letters ISSN NO : 1006-6748

WEB APPLICATION DEVELOPMENT USING


DJANGO FRAMEWORK- LIBRARY
MANAGEMENT SYSTEM
Shanmugapriyaa D 1, Shreemathi M1,Shreenithi M 1,Dr.M. Sujithra2, Dr.D. Sudha Devi 3

1 Student, Department of Computing-Data Science, Coimbatore Institute of Technology, India.

2 Assistant Professor, Department of Computing- Data Science, Coimbatore Institute of Technology, India

3 Associate Professor, Department of Computing -Data Science, Coimbatore Institute of Technology, India

Abstract: Python is a well-known programming language that is frequently utilized in the development
of websites and online applications. It is simple to learn, has a large and active community, numerous
libraries and frameworks, and it is common practice to make use of web frameworks in order to
streamline the process of developing and distributing web applications online. Django, a Python-based
web application framework, serves as an illustration of such a framework. The objective of the library
management system is to make it simpler to track administrative and student data. This is done by
creating a computer system that only allows the administrator to access and manage library resources.
Additionally, students can view and see the expiration dates of their borrowed books in the system. The
primary goal of this system is to make it easier to keep track of all pertinent information regarding
book issues, students, and resources, reduce manual labour, and eliminate the requirement for manual
record-keeping. The Database is the primary component of the web application that stores and
organizes data. We must select a database that enhances interaction when developing an application or
website. An SQLite data set is implicitly included with Django.
Keywords — Python, Django, Web Technology Framework, Modules,Web Application, Full
Stack Development.

1. INTRODUCTION abstracts away many of the low-level details


that other programming languages require, it is
Python is a well-known programming easier to maintain and faster to write. To put it
language known for its high-level another way, it makes it more straightforward
functionality, object-oriented paradigm, to compose code and sort out it by supporting
interactivity, and versatility. Python is the production of classes and articles. This
compatible with procedural, object-oriented, makes it simple to get support and assistance
and functional programming styles. Python is when you need it.
a powerful and adaptable language because of Flexibility: Python is a versatile programming
its ease of use, cross-platform compatibility, language that can be used in a lot of different
extensive standard library, high-level areas, like data analysis, web development,
characters, support for object-oriented artificial intelligence, and scientific
programming, large community, and support computing. In general, Python is a powerful
and flexibility across numerous languages. a and adaptable programming language that can
comprehensive programming language Among be used for a wide range of tasks and is well-
these are its adaptability, ease of use, platform liked by developers all over the world. Due to
compatibility, extensive standard library, high- its key characteristics of readability, ease of
level nature, support for object-oriented coding, free and open-source nature, robust
programming, and large community. standard library, portability, support for object-
A huge collection of standards: Numerous oriented and procedural programming
modules and packages in the extensive paradigms, and extensibility, Python is a
standard library of Python simplify web versatile choice. has expanded into a more
development and data processing. Because it diverse language. It has matured into a robust

Volume 29, Issue 4, 2023 13 http://www.gjstx-e.cn/


High Technology Letters ISSN NO : 1006-6748

programming language that is application- the view shows the data to the client and the
oriented. design makes the HTML. Data typically
1.1 An Overview of Django moves in only one direction in MVT, and the
Django is a well-liked open-source and free template language is typically simple to
web development framework based on Python. comprehend and utilize. The MVT pattern's
It provides numerous built-in features for rapid emphasis on modularity and code reuse makes
development and ensures that the resulting it simpler to maintain and scale web
website is secure, scalable, and simple to applications.
maintain. Django, a web application
development framework based on Python.
2. METHODOLOGY
The Library Management System is an
Rapid development: Django has a set of pre-
essential tool for managing library resources
built tools and libraries that make development
and activities. The proposed work aims to
faster and easier.
develop a web-based Library Management
Versatility: Django is adaptable and can be
System using Python Django to manage the
used to build a wide range of web applications,
library's resources and activities by providing
such as virtual entertainment platforms,
options to add and update information about
business websites, and content management
books, authors, borrowers, and lending details.
frameworks. From there, the possibilities are
endless. The Library Management System website has
Incorporation of various technologies: Because four modules: books, authors, borrowers, and
it is compatible with other Python libraries and lending details. The books module provides
frameworks, integrating Django with third- options to add and update information about
party services and tools is simple. With this books, such as the book title, author name,
technology, extensive documentation, and publisher, ISBN number, and the number of
community support, developers can use the copies available. The authors module provides
capabilities of other Python libraries and options to add and update information about
frameworks to create more complex web authors, such as the author’s name, date of
applications. birth, and country of origin. The borrower’s
In conclusion, Django makes Python web module provides options to add and update
development more efficient by providing pre- information about borrowers, such as the
built tools and libraries, scalability, security, borrower's name, contact details, and address.
versatility, and compatibility with other The lending details module provides options to
versions. add and update information about lending
details, such as the book borrowed, the
1.2 The Model-View-Template borrower's name, and the due date.
The Model-View-Template(MVT) design Define the requirements: The first step in
developing a Library Management System is
pattern is used to divide web application
to define the requirements. This includes
codeinto three parts: the format, the view, and
identifying the modules, the information to be
the model. This pattern and the Model-View- collected, and the functionalities required.
Controller (MVC) pattern differ in a few ways. Design the database schema: After defining
In MVT, the application's data and business the requirements, the next step is to design the
logic are represented by the model, the user database schema. This involves creating tables
sees the data, and the template creates the for each module and defining the relationships
HTML. Data typically moves in only one between them.
direction in MVT, and the template language is Implement the database schema: After
typically simple to comprehend and utilize. designing the database schema, the next step is
The MVT pattern's emphasis on modularity to implement it using Django's ORM (Object-
and code reuse makes it simpler to maintain Relational Mapping) system.
and scale web applications. In MVT, the model Implement the views: After implementing the
database schema, the next step is to implement
is obligated for tending to the data and the
the views. Views are responsible for handling
business reasoning of the application, while requests and rendering responses.

Volume 29, Issue 4, 2023 14 http://www.gjstx-e.cn/


High Technology Letters ISSN NO : 1006-6748

Implement the templates: After implementing Admin users can also view statistics and
the views, the next step is to implement the reports related to the library's resources and
templates. Templates are responsible for activities.
rendering HTML pages.  Add Books Page
Implement the authentication system: After This page allows users to add new books to the
implementing the basic functionalities, the library. Users can enter the book's title, author,
next step is to implement the authentication publisher, ISBN number, publication date, and
system. The authentication system is the number of copies available. The new book
responsible for user management, such as is then added to the library's collection and is
registration, login, and logout. displayed on the Books Page.
Implement the search functionality: After
implementing the authentication system, the  Issue Book Page
next step is to implement the search This page allows users to issue books to
functionality. The search functionality allows borrowers. Users can select the book to be
users to search for books, authors, and issued, the borrower's name, and the due date.
borrowers based on specific criteria. If the book is already issued, the system
Implement the borrowing functionalities: After checks if it is overdue or not. If it is overdue, a
implementing the search functionality, the next message is displayed to the user, and they
step is to implement the borrowing cannot issue the book until it is returned by the
functionalities. These functionalities allow borrower.
users to borrow books, and update the lending Each of these pages adds additional
details accordingly. functionality to the library management
 Login Page system, providing more tools for managing the
This page allows users to log in to the Library library's resources and activities. By
Management System using their username and incorporating these pages, the library
password. Users who are not yet registered can management system becomes a comprehensive
click on the "Register" button to create a new tool for managing library resources and
account. activities in a seamless and efficient manner.
 Register Page In conclusion, developing a Library
This page allows users to register for the Management System using Python Django
Library Management System by providing involves defining the requirements, designing
their name, email address, username, and the database schema, implementing the
password. After registering, users can log in to database schema using Django's ORM system,
the system to access its functionalities. implementing the views, implementing the
 Logout Page templates, implementing the authentication
This page allows users to log out of the system, implementing the search functionality,
Library Management System, ensuring the and implementing the borrowing
security of their account information. functionalities. These steps ensure that the
 Students Page Library Management System is efficient,
This page displays a list of students registered scalable, and secure, providing users with a
with the library, along with their names, robust and reliable system for managing
contact details, and enrolment number. Users library resources and activities.
can also search for students by their name or
enrolment number. Users can click on a 3. FULLSTACKDEVELOPMENT
student's name to view more details about the 3.1. SettingupDjangoenvironment:
student, such as their borrowing history and To set up the Django environment with Python
the due dates for their currently borrowed for a library management system, follow these
books. steps:
 Admin Page  Install Python: First, you need to install
This page is accessible only to the admin users Python on your system. The most recent
of the library management system. It provides version of Python is available for
access to functionalities such as adding or download and installation from the
removing books, adding or removing official Python website.
borrowers, and managing lending details.

Volume 29, Issue 4, 2023 15 http://www.gjstx-e.cn/


High Technology Letters ISSN NO : 1006-6748

python -m ensurepip --default-pip

 Install pip: Pip is a package templates in your app folder and add
management system used to install and HTML files to it.
manage Python packages. To install pip,  Define URL patterns: URL patterns are
run the following command in the used to map URLs to views. To define
command prompt: URL patterns, open the urls.py file in
 Install Django: To install Django, run your app folder and define the URL
the following command in the command patterns for your views.
prompt:  Migrate the database: Once you have
 Create a project in Django: To make defined your models, run the following
another Django project, run the command in the command prompt to
accompanying order in the order brief: create the database tables:

django-admin
pip install Django
startproject library  R
python manage.py makemigrations
u
python manage.py migrate
n
 Create a Django app: To create a new the development server: To run the
Django app, run the following command development server, run the following
in the command prompt: command in the command prompt:
Y
o python manage.py runserver
 C u
o python manage.py
n startapplibrarymanagement
can now access your library
f management system by opening a web
i browser and navigating to
gure the database: By default, Django http://localhost:8000/.
uses SQLite as the database engine. If
you want to use a different database
3.2. DatabaseSqlite3Connectivity:
engine, you need to update the database
To set up the database SQLite3 connectivity
settings in the settings.py file.
with Django and Python for a library
 Create models: Models are used to
define the structure of the database management system, follow these steps:
tables. To create models, open the  Install SQLite3: SQLite3 is a self-
models.py file in your app folder and contained, serverless, zero-configuration,
define the fields for your models. and transactional SQL database engine.
 Create views: Views are used to handle To install SQLite3, download it from the
HTTP requests and render HTML SQLite3 website and install it on your
system.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR,
'db.sqlite3'),
}
}

templates. To create views, open the


views.py file in your app folder and
define the functions to handle different
requests.
 Create templates: Templates are used to
render HTML pages. To create
templates, create a new folder called

Volume 29, Issue 4, 2023 16 http://www.gjstx-e.cn/


High Technology Letters ISSN NO : 1006-6748

from django.db import models objects in the database using Python co


This code creates a new Book object and saves
it to the database.
class Book(models.Model):
catchoice= [
 Test the database connectivity: To test the
('education', 'Education'), database connectivity, you can run the
('entertainment', 'Entertainment'), development server by running the
('comics', 'Comics'), following command in the command
('biography', 'Biographie'), prompt:
('history', 'History'),
] python manage.py runserver

name=models.CharField(max_length=30) You can then navigate to the web application


isbn=models.PositiveIntegerField() and perform database operations to ensure that
the database connectivity is working as
expected.
author=models.CharField(max_length=40
) 3.3. Technical Stack:
 Configure the database: In Django, the In today's era of digitalization, there are
database settings are defined in the various front-end and back-end technologies
settings.py file. Open the settings.py file available for web development. This paper
in your Django project and update the briefly discusses the technologies used in
following settings to use SQLite3 as the developing a library management system with
database engine: Django and Python.
The ENGINE setting specifies the database  HTML
engine, and the NAME setting specifies the HTML (Hypertext Markup Language) is the
database file name. language used most frequently to create web
 Create models: Models are used to define pages. It was initially developed for the
the structure of the database tables. To purpose of defining the structure of
create models, open the models.py file in documents, but it is now widely utilized to
your app folder and define the fields for format web pages by utilizing a variety of
your models. HTML tags.
This code defines a Book model with fields for • CSS
the title, author, publication date, publisher, By describing how HTML elements should be
ISBN, and category. displayed on paper, screen, or other media,
 Create database tables: Once you have CSS (Cascading Style Sheets) is a method for
defined your models, run the following controlling the layout of multiple web pages
commands in the command prompt to simultaneously and saving a lot of time.
create the database tables: • Bootstrap
Bootstrap is a responsive portable connection
python manage.py makemigrations point web improvement structure that is free
python manage.py migrate and open-source. Using CSS and JavaScript, it
has typography, forms, buttons, navigation,
and other user interface components.
 Use the Django ORM: Django provides
•Javascript
an object-relational mapping (ORM)
JavaScript is a high-level interpreted
system that allows you to interact with
programming language used for websites,
the database using Python objects. To
along with HTML and CSS. It enables
use the Django ORM, open the Python
interactive web pages and supports event-
shell by running the following command
based, functional, and imperative styles. Data
in the command prompt:
processing is sped up by client-side form
validation using JavaScript over server-side
 Then, you can create and manipulate validation.
from django.contrib import admin • Jinja2 Template
from .models import Book

class BookAdmin(admin.ModelAdmin):
pass
Volume 29,admin.site.register(Book,
Issue 4, 2023 BookAdmin) 17 http://www.gjstx-e.cn/
High Technology Letters ISSN NO : 1006-6748

Jinja2 is a well-known Python model engine


that adds an expressive language to the Django
templating system and gives modelers more
powerful tools.

4. EXPERIMENTALSETUP
AND RESULTS
4.1. File Directory
The file directory for a Django website
typically follows a specific structure, as
follows:
 apps.py: This file contains a Python
class that extends the "AppConfig"
class from the "django.apps" module.
The purpose of this class is to provide
metadata about the app, such as its
name, label, and module.’
 Static: This file is used to store static
files, such as CSS, JavaScript, images,
and other assets that are required by
your web application.
 Templates : This file describes the
structure and layout of a web page, as
well as how data is presented on
it.Templates can be used to create a Figure1Filestructure
consistent look and feel across an  Manage.py : This file allows to
entire website or to customize the manage various aspects of their
appearance of individual pages. project, including database migrations,
running development servers, and
creating new Django applications.
 Db.sqlite3 : This file contains all the
data for the project, including the data
stored by the application's models.
When the application is run, Django
uses the database to store and retrieve
data as necessary.

4.2. Libraries Used:

asgiref==3.2.7
Django==3.0.5
django-widget-tweaks==1.4.8
pytz==2020.1
sqlparse==0.3.1

4.3. Results
 Home Page

Volume 29, Issue 4, 2023 18 http://www.gjstx-e.cn/


High Technology Letters ISSN NO : 1006-6748

Figure 2.1 Home page Figure 5 Home page displaying for admin

Figure 2.2 Home page displaying for admin and student Figure 6 Login page for admin

 Students Page

Figure 7 Accessing options for the admin

Figure 3 Home page displaying for student

Figure 8 Displaying the list of students available for the


admin
Figure 4 Login page for student
 Books Page
 Admin Page

Volume 29, Issue 4, 2023 19 http://www.gjstx-e.cn/


High Technology Letters ISSN NO : 1006-6748

Figure 13 Page to contact the library


Figure 9 Displaying the list of books available
5. CONCLUSION
 Issue books page In conclusion, the library management
system developed using Django and
Python is a useful tool for students and
library staff. The system is efficient,
secure, and provides many features that
make the library experience more
interactive and enjoyable. Students can
easily search for books and request them
online, while faculty members can
organize events and add lecture notes
which can be further developed. The
Figure 10 Displaying the credentials for issuing the book
to the student system is also future-ready, with the
potential to add instructional videos,
online assignments, and group discussion
features. The project was successfully
implemented by setting up the Django
environment, connecting to SQLite
database, designing templates, and
creating views and models. Overall, the
library management system can improve
the library experience for everyone
involved and should be considered for
Figure 11 Displaying the list of issued books implementation in educational institutions.

 About Us Page
6. REFERENCES
1. https://www.w3schools.com/djang
o/
2. https://doc.lagout.org/programmati
on/Django/Pro%20Django%20%2
82nd%20ed.%29%20%5BAlchin%
202013-07-09%5D.pdf
3. http://gsl-
Figure 12 Page showing the details about the library
archive.mit.edu/media/programs/m
exico-summer-
2014/materials/djangobook.pdf
 Contact Us Page

Volume 29, Issue 4, 2023 20 http://www.gjstx-e.cn/


High Technology Letters ISSN NO : 1006-6748

4. https://www.gti.bh/Library/assets/d
jangobookwzy482.pdf
5. http://gsl-
archive.mit.edu/media/programs/m
exico-summer-
2014/materials/djangobook.pdf
6. Efficient_Way_of_Web_Developm
ent_Using_P%20(3).pdf
7. “Django.”
https://www.djangoproject.com

Volume 29, Issue 4, 2023 21 http://www.gjstx-e.cn/

You might also like