2 April2023
2 April2023
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.
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.
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.
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'),
}
}
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
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.
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
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
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
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