You are on page 1of 32

DIET RECOMMENDATION CHATBOT

A PROJECT REPORT
Submitted by

DEVEN JAIMIN DESAI

200170111004

In partial fulfillment for the award of the degree of

In

BACHELOR OF ENGINEERING

Electronics and Communication

Vishwakarma Government Engineering College, Chandkheda

Gujarat Technological University, Ahmedabad

May, 2024
Vishwakarma Government Engineering College

Vishwakarma Government Engineering College,


Nr. Visat three roads, Sabarmati-Koba highway, Chandkheda,
Ahmedabad, Gujarat, India-382424

CERTIFICATE

This is to certify that the internship report submitted along with the

internship entitled Data Science has been carried out by Deven Jaimin

Desai under my guidance in partial fulfillment for the degree of Bachelor of

Engineering in Electronics and Communication, 8th Semester of Gujarat

Technological University, Ahmedabad during the academic year 2023-24.

Prof. Chintan Dave Dr. Arun Nandurbarkar

Internal Guide Head of the Department

Gujarat Technological University 1 VGEC


Gujarat Technological University 2 VGEC
Vishwakarma Government Engineering College
Vishwakarma Government Engineering College,
Nr. Visat three roads, Sabarmati-Koba highway, Chandkheda,
Ahmedabad, Gujarat, India-382424

DECLARATION
I hereby declare that the Internship / Project report submitted along with

Internship / Project Data Science submitted in partial fulfillment for the

degree of Bachelor of Engineering in Electronics and Communication to

Gujarat Technological University, Ahmedabad, is a bonafide record of

original project work carried out by me at Vishwakarma Government

Engineering College under the supervision of Prof. Chintan Dave and that

no part of this report has been directly copied from any students’ reports or

taken from any other source, without providing due reference.

Name of student Sign of student


Deven Desai

Gujarat Technological University 3 VGEC


ACKNOWLEDGEMENT
I wish to express my sincere gratitude to both of my internal Prof. Chintan

Dave and all the faculty members for helping me through my internship

along with their valuable co-ordination in completing this internship.

I also thank to my parents, friends all the family members for their

prospective support and encouragement which they had provided in

completion of my internship. In addition to this, I would also like to mention

the college personals who gave me the permission to use and experience the

valuable resources required for the Internship from College Premises.

Thus, in the conclusion to the above said, I once again thank the faculties and

members of Vishwakarma Government Engineering College for their

valuable support in completion of my internship.

Thanking you

Deven Jaimin Desai

Gujarat Technological University 4 VGEC


ABSTRACT

This internship report encapsulates a hands-on exploration of


embedded systems, blending theoretical understanding with
practical application. Focused on the integration of C language
programming, 8051 microcontroller architecture, UART and I2C
communication protocols, and the utilization of Keil and Proteus
software tools, the report provides a comprehensive journey
through the intricacies of embedded system development.
Beginning with an introduction to the foundational principles of C
language and its relevance in embedded systems, the report
navigates through the architecture and programming intricacies of
the 8051 microcontroller, laying a strong groundwork for
subsequent discussions. Delving into communication protocols, it
elucidates the principles behind UART and I2C, offering practical
insights into their implementation. The report also sheds light on
the indispensable role of Keil software in project development,
encompassing project setup, debugging, and optimization
techniques. Furthermore, it explores the simulation capabilities of
Proteus software, facilitating virtual prototyping and system
validation. Through a blend of theoretical discussions, practical
examples, and hands-on tutorials, this report equips readers with
the requisite knowledge and skills to embark on embedded system
projects with confidence and proficiency.

Gujarat Technological University 5 VGEC


List of Figures

Figure 4.1.1................................................................................................................................
Figure 4.1.2................................................................................................................................
Figure 4.1.3................................................................................................................................
Figure 4.1.4................................................................................................................................
Figure 4.1.5................................................................................................................................
Figure 4.1.6................................................................................................................................
Figure 5.2.1................................................................................................................................
Figure 5.2.2................................................................................................................................
Figure 5.3.1................................................................................................................................
Figure 5.4.1................................................................................................................................
Figure 6.1.1................................................................................................................................
Figure 6.1.2................................................................................................................................
Figure 6.1.3................................................................................................................................
Figure 6.1.4................................................................................................................................
Figure 7.1.1................................................................................................................................
Figure 7.1.2................................................................................................................................
Figure 7.1.3................................................................................................................................
Figure 7.1.4................................................................................................................................

Gujarat Technological University 6 VGEC


LIST OF CONTENTS
ACKNOWLEDGEMENT...................................................................................................................4
ABSTRACT........................................................................................................................................5
List of Figures.....................................................................................................................................6
LIST OF CONTENTS........................................................................................................................7
1. OVERVIEW OF THE PROJECT...................................................................................................8
1.1 Brief overview of web development and its significance.....................................................8
2. Python: The Versatile Programming Language............................................................................12
2.1 Overview of Python's features, popularity, and community support..................................12
2.2 Explanation of Python's role in web development..............................................................14
3. Django: The High-Level Web Framework...................................................................................17
3.1 Introduction to Django as a powerful web framework........................................................17
3.2 Explanation of why developers choose Django for web projects.......................................18
3.3 Highlighting Django's key features, such as the ObjectRelational Mapping (ORM) system,
template engine, and built-in admin interface...........................................................................19
4. Creating a Django Project.............................................................................................................21
4.1 Detailed walkthrough of creating a new Django project using the command line.............21
4.2 Explanation of the project structure and the purpose of main files (settings.py, urls.py,
views.py)...................................................................................................................................23
5. Building Web Applications with Django Apps.............................................................................24
5.1 Create a New Django Project and Django App...................................................................24
5.2 Create Models for Data base...............................................................................................24
5.3 Create Views for Application..............................................................................................25
6. Explanation of how to create Register page in Django.................................................................26
7. Explanation of how to create Login page in Django....................................................................28
Conclusion........................................................................................................................................30
Reference...........................................................................................................................................31

Gujarat Technological University 7 VGEC


1. OVERVIEW OF THE PROJECT

1.1 Brief overview of web development and its significance.

Web development refers to the process of creating and maintaining websites and web
applications that are accessible over the internet. It involves a combination of
programming, design, content creation, and server management to build interactive and
visually appealing online experiences. Web development encompasses both the front-
end, which focuses on the user interface and user experience, and the back-end, which
deals with the server-side logic and data management.

Significance of Web Development:


1. Global Reach and Accessibility: The internet provides a platform for
reaching a global audience 24/7. Websites and applications enable
businesses, organizations, and individuals to connect with users
worldwide, breaking down geographical barriers.

2. Business Presence and E-commerce: A well-designed website is often


a company's first point of contact with potential customers. For
ecommerce, web development enables businesses to sell products and
services online, expanding their market reach and revenue potential.

3. Information Dissemination: Websites are a primary source of


information dissemination. Educational institutions, news outlets, and
government agencies use web development to share knowledge, news,
and resources with the public.

4. User Interaction and Engagement: Web applications facilitate dynamic


user interactions, enabling features like real-time chat, interactive forms,
and personalized recommendations. Engaging user experiences lead to
higher user retention.

5. Automation and Efficiency: Web applications can automate various


processes, from customer support chats to order processing. This
automation enhances efficiency and reduces manual workload.

Gujarat Technological University 8 VGEC


6. Data Collection and Analysis: Web development allows for the
collection and analysis of user behavior data. This information helps
businesses make informed decisions, improve user experiences, and
optimize their offerings.

7. Collaboration and Communication: Intranet portals and collaboration


tools developed for organizations enhance communication and teamwork
among employees, leading to improved productivity.

8. Emerging Technologies: Web development is constantly evolving,


incorporating emerging technologies such as artificial intelligence,
virtual reality, and Internet of Things (IoT), leading to innovative and
immersive online experiences.

9. Responsive Design: With the increasing use of mobile devices,


responsive web design ensures that websites and applications adapt
seamlessly to various screen sizes, enhancing user experience across
devices.

10. Career Opportunities: The demand for skilled web developers


continues to grow, offering a wide range of career opportunities in both
front-end and back-end development, as well as specialization in areas
like UX/UI design and web security.

a. Introduction to Python and Django as tools for web


development.

Python and Django are a powerful duo in the world of web development,
enabling developers to create dynamic and feature-rich websites and
applications. Python, known for its simplicity and versatility, serves as the
programming language of choice, while Django, a high-level web
framework, provides a structured and efficient way to build web
applications. This section introduces the synergistic relationship between
Python and Django, highlighting their key attributes and how they contribute
to modern web development.

Python: The Backbone of Web Development:

Gujarat Technological University 9 VGEC


Python's popularity has soared in the web development community due to its
clear syntax, readability, and extensive libraries. It offers several advantages
in web development:

1. Versatility: Python can be used for both front-end and back-end


development, making it suitable for building complete web applications.

2. Developer-Friendly: Its clean and concise syntax reduces coding errors


and development time, making it an ideal language for rapid
development.

3. Large Ecosystem: Python boasts a vast collection of libraries and


frameworks that cater to various aspects of web development, such as
data manipulation, networking, and user interface design.

4. Cross-Platform Compatibility: Python applications can run on different


platforms and operating systems without major modifications.

5. Readability: Python's readable code enhances collaboration among


developers and simplifies the maintenance of web applications.

Django: The Web Framework for Perfection:


Django, built on Python's foundations, provides a comprehensive set of tools for
building web applications efficiently. Its features make it an attractive choice for
developers:

1. High-Level Abstractions: Django abstracts complex tasks, such as


database management and URL routing, allowing developers to focus on
creating application logic.

2. Model-View-Controller (MVC) Architecture: Django follows the


MVC pattern, separating data models (M), user interfaces (V), and
application logic (C), promoting modular and organized code.

3. Object-Relational Mapping (ORM): Django's ORM eliminates the


need to write SQL queries directly, simplifying database interactions and
management.

Gujarat Technological University 10 VGEC


4. Built-In Admin Interface: Django provides an admin panel for
managing application data, making it easy to create, update, and delete
records without manual database manipulation.

5. URL Routing and Views: Django's URL routing and view system
simplify the mapping of URLs to specific view functions, enhancing
navigation and user experience.

6. Template Language: The template engine allows developers to create


dynamic and data-driven HTML templates, streamlining the process of
rendering user interfaces.

7. Security Measures: Django comes with built-in security features, such


as protection against common web vulnerabilities like cross-site scripting
(XSS) and cross-site request forgery (CSRF).

Gujarat Technological University 11 VGEC


2. Python: The Versatile Programming Language

2.1 Overview of Python's features, popularity, and community support.


Python is a high-level programming language known for its simplicity,
readability, and versatility. It has gained immense popularity and a strong
community following due to its rich set of features that cater to a wide range
of applications. This section provides an overview of Python's key features,
its popularity in the programming landscape, and the robust community
support that contributes to its continuous growth.

Key Features of Python:

1. Readable and Expressive Syntax: Python's clean and straightforward


syntax enhances code readability, making it easier for developers to
understand and collaborate on projects.

2. Versatility: Python can be used for various purposes, including web


development, data analysis, scientific computing, machine learning,
automation, scripting, and more.

3. Dynamically Typed: Python is dynamically typed, which means variable


types are determined at runtime, allowing for more flexible and intuitive
coding.

4. Extensive Standard Library: Python's standard library includes a wide


range of modules and packages for common tasks, reducing the need to
write code from scratch.

5. Cross-Platform Compatibility: Python code can run on multiple


platforms and operating systems without modification, enhancing its
portability.

6. Interpreted Language: Python is an interpreted language, which allows


for faster development cycles as code changes can be executed
immediately without the need for compilation.

Gujarat Technological University 12 VGEC


7. Object-Oriented: Python supports object-oriented programming (OOP)
principles, allowing developers to create reusable and modular code
structures.

8. Large Third-Party Ecosystem: The Python Package Index (PyPI) hosts


thousands of third-party libraries and frameworks that extend Python's
capabilities for various applications.

Popularity of Python:

Python's popularity has grown significantly over the years, making it one of
the most widely used programming languages. Its popularity is attributed to:

1. Ease of Learning: Python's simple syntax and readability make it an


ideal choice for beginners and experienced programmers alike.

2. Community Demand: Python's versatility supports a wide range of


applications, from web development to data science, meeting the
demands of different industries.

3. Data Science and Machine Learning: Python's strong presence in data


science and machine learning has contributed to its widespread adoption,
with libraries like NumPy, pandas, and TensorFlow.

4. Startups and Prototyping: Python's rapid development capabilities


make it a preferred choice for startups and prototyping projects.

5. Web Development: Frameworks like Django and Flask have solidified


Python's position in web development.

Community Support:

Python's success is fueled by its robust and passionate community of


developers, educators, and enthusiasts:

Gujarat Technological University 13 VGEC


1. Open Source Nature: Python is open source, fostering collaboration and
enabling anyone to contribute improvements or develop new features.

2. Active Development: Python's core development team continuously


releases updates, bug fixes, and enhancements to ensure the language's
quality and relevance.

3. Online Resources: The Python community offers an abundance of


tutorials, documentation, forums, and online communities for support and
learning.

4. Conferences and Meetups: Python conferences and meetups are held


worldwide, allowing developers to network, share knowledge, and stay
updated on the latest developments.

2.2 Explanation of Python's role in web development.

Python's versatility extends to web development, where it plays a pivotal


role in creating dynamic and robust web applications. Python offers a range
of tools, frameworks, and libraries that facilitate every aspect of the web
development process, from server-side scripting to front-end interactions.
This section explains how Python contributes to different stages of web
development and why it's a preferred choice for developers in this domain.

Server-Side Scripting:

Python's role in web development starts on the server side, where it handles
various tasks:

1. Business Logic: Python is used to implement the core logic of web


applications, including processing user inputs, performing calculations,
and handling data manipulation.

2. Data Management: Python's object-relational mapping (ORM)


frameworks, such as Django's ORM and SQLAlchemy, simplify
database interactions, enabling developers to define models and perform
database operations using Python code.

Gujarat Technological University 14 VGEC


3. API Development: Python is commonly used to create RESTful APIs
(Application Programming Interfaces) that allow different components
of a web application to communicate.

4. Authentication and Security: Python facilitates user authentication and


data security by integrating with encryption libraries, authentication
protocols, and access control mechanisms.

Web Frameworks:

Python's web frameworks provide structured tools for developing web


applications. Notable frameworks include:

1. Django: A high-level framework that follows the Model-ViewController


(MVC) architectural pattern. It includes features like URL routing, an
ORM system, an admin panel, and a template engine, enabling rapid
development.

2. Flask: A micro-framework that provides the essentials for building web


applications. Flask is more lightweight and flexible, allowing developers
to choose components and extensions based on project needs.

Front-End Development:

While Python is often associated with back-end development, it also


contributes to front-end interactions:

1. Template Engines: Frameworks like Django offer template engines that


help generate dynamic HTML content, allowing developers to mix
Python code with HTML templates.

2. JavaScript Integration: Python can be used in conjunction with


JavaScript to enhance interactivity and deliver dynamic user experiences.
Python frameworks provide APIs for integrating JavaScript libraries and
frameworks.

Gujarat Technological University 15 VGEC


Web Scraping and Automation:

Python's versatility extends beyond building web applications. It's often used
for:

1. Web Scraping: Python's libraries like BeautifulSoup and Scrapy allow


developers to extract data from websites, enabling applications that
gather information from the web.

2. Automation: Python scripts can automate repetitive tasks, such as


updating website content, sending emails, and managing data.

Deployment and Hosting:

Python applications are deployed using various methods:

1. Server Deployment: Python applications can be deployed on various


web servers, such as Apache, Nginx, or Gunicorn, allowing them to
handle incoming HTTP requests.

2. Cloud Platforms: Python applications can be hosted on cloud platforms


like AWS, Heroku, and Google Cloud, leveraging their scalable
infrastructure.

3. Django: The High-Level Web Framework

Gujarat Technological University 16 VGEC


3.1 Introduction to Django as a powerful web framework.
Django is a robust and high-level web framework that empowers developers
to build sophisticated web applications with efficiency and ease. Known for
its "batteries-included" philosophy, Django provides a comprehensive toolkit
that streamlines various aspects of web development, from handling
database interactions to managing user authentication. This section
introduces Django's key features, its architectural principles, and its role as a
powerful tool for crafting modern web applications.

Key Features of Django:

1. Rapid Development: Django's built-in components and pre-designed


functionality accelerate the development process. This allows developers
to focus on application-specific features rather than reinventing the
wheel.

2. Model-View-Controller (MVC) Architecture: Django follows the


MVC architectural pattern, which separates the application into three
main components: Models (data handling), Views (user interface logic),
and Templates (presentation layer). This separation enhances code
organization and modularity.

3. Object-Relational Mapping (ORM): Django's ORM system abstracts


database interactions, enabling developers to define data models using
Python classes. This approach simplifies database management, reduces
SQL-related errors, and supports various database backends.

4. Admin Interface: Django's admin panel provides an out-of-the-box


solution for managing application data. It enables developers to create,
update, and delete records without requiring manual database
manipulation.

5. URL Routing: Django's URL routing system maps URLs to specific


view functions, facilitating clean and organized URL structures. This
enhances navigation and user experience.

6. Template Engine: Django's template language allows developers to


create dynamic HTML templates, rendering data and logic within the

Gujarat Technological University 17 VGEC


presentation layer. This promotes separation of concerns between the
back end and front end.

7. Security Measures: Django incorporates security features like


protection against cross-site scripting (XSS) and cross-site request
forgery (CSRF) attacks. It also supports user authentication and
authorization mechanisms.

3.2 Explanation of why developers choose Django for web projects.


Developers often choose Django for web projects for a variety of compelling
reasons. Django is a high-level Python web framework that was designed to
help developers build robust and scalable web applications quickly and
efficiently. Here are some of the key reasons why developers prefer Django:

1. Batteries-Included Philosophy: Django follows a "batteries-included"


philosophy, providing a wide range of built-in features and tools to
simplify web development. This includes an ORM (Object-Relational
Mapping) for database management, an admin panel for easy content
management, authentication, and more. Developers don't have to
reinvent the wheel for common web development tasks.

2. Scalability: Django is designed with scalability in mind. Its architecture


allows developers to build applications that can easily scale to
accommodate growing user bases and increased traffic.

3. Community and Ecosystem: Django has a large and active community


of developers, which means there is a wealth of resources, libraries, and
third-party packages available. This ecosystem makes it easier to find
solutions to common problems and accelerates development.

4. Documentation: Django has extensive and well-maintained


documentation. This makes it easy for developers, both beginners and
experienced, to learn and use the framework effectively.

5. Versatility: While Django is often associated with content-heavy


websites and web applications, it is versatile enough to be used for
various types of projects, including APIs, real-time applications,
ecommerce platforms, and more.

Gujarat Technological University 18 VGEC


6. Cross-Platform Compatibility: Django is compatible with various
databases, web servers, and operating systems, making it flexible for
deployment on different platforms.

7. Built-in Testing Framework: Django comes with a built-in testing


framework that allows developers to write unit tests and integration tests
for their applications. This promotes code quality and helps maintain
application reliability.

8. REST Framework: For projects requiring API development, Django


REST framework is a popular extension that simplifies the creation of
RESTful APIs, making it a strong choice for building web services and
mobile app backends.

3.3 Highlighting Django's key features, such as the ObjectRelational


Mapping (ORM) system, template engine, and built-in admin interface.

1. Object-Relational Mapping (ORM) System:


• Django includes a powerful ORM system that allows developers to work
with databases using Python objects and classes.
• Developers can define database models in Python, and Django handles
the generation of SQL queries, making database interactions more
intuitive and less error-prone.
• The ORM supports multiple database backends, providing flexibility in
choosing the right database for your project.

2. Template Engine:
• Django includes a robust template engine that separates the presentation
layer from the application logic.
• Templates are written in HTML with Django template tags, allowing
developers to dynamically generate HTML content based on data from
the backend.
• Template inheritance simplifies the creation of consistent and
maintainable page layouts across the application.

3. Built-in Admin Interface:


• Django provides an automatic admin interface for managing application
data.
• Developers can quickly generate a customizable admin panel for their
database models without writing custom admin interfaces.

Gujarat Technological University 19 VGEC


• The admin interface offers features such as data CRUD (Create, Read,
Update, Delete) operations, search, filtering, and permission control,
making it easy to manage content and users.

4. URL Routing:
• Django includes a URL routing mechanism that maps URLs to views,
allowing developers to define how different URLs in the application
should be handled.
• URLs can be defined with parameters, making it possible to pass data to
views and create dynamic, data-driven web applications.

Gujarat Technological University 20 VGEC


4. Creating a Django Project

4.1 Detailed walkthrough of creating a new Django project using the


command line.

Creating a new Django project using the command line is a straightforward


process. Django provides a command-line tool called 16jango-admin or
manage.py (a script that comes with every Django project) to help you create
and manage Django projects and applications. Here’s a detailed walkthrough of
creating a new Django project:

Step 1: Create a New Django Project


Open your command-line terminal and navigate to the directory where you
want to create your Django project. Then, run the following command to
create a new Django project. Replace projectname with app1:

Figure 4.1.1

Step 2: Project Structure


After running the above command, your project directory (pro1) should
contain the following files and directories:

Figure 4.1.2

Here's a brief description of each file:


• pro1/: The main project package.
• ‘__init__.py’: An empty file that makes the directory a Python package.
• ‘settings.py’: Configuration settings for your Django project.
• ‘urls.py’: URL routing configuration.
• ‘asgi.py and wsgi.py’: ASGI and WSGI application entry points for web
servers.
• ‘Wsgi.py’: It exposes the WSGI callable as a module-level variable
named ``application``.

Gujarat Technological University 21 VGEC


Step 3: Configure Database (Optional)
By default, Django uses SQLite as the database for development. If you
want to use a different database, open the settings.py file in your project
directory and configure the DATABASES setting with your database
credentials.

Step 4: Migrate the Database


Before you can use the database, you need to run migrations to create the
necessary database tables. Run the following command:

Figure 4.1.3

This command will create the database tables defined in Django’s built-in
apps and any additional apps you create later.

Step 5: Create a Superuser


To create an admin user for your Django project, use the following
command:

Figure 4.1.4

Step 6: Run the Development Server


You can now start the development server to test your project:

Figure 4.1.5

The development server will run by default on: ‘http://127.0.0.1:8000/’

Step 7: Access the Admin Interface


If you created a superuser, you can access the Django admin interface at
http://127.0.0.1:8000/admin/ and log in using the superuser credentials you
created.

Gujarat Technological University 22 VGEC


Step 8: Create Django Apps
To build your project, you’ll likely need to create Django apps within your
project. You can create an app using the following command:

Figure 4.1.6

4.2 Explanation of the project structure and the purpose of main


files (settings.py, urls.py, views.py).

1. settings.py:
• This file contains the configuration settings for your Django project.
• It includes settings for databases, middleware, installed apps,
authentication, templates, and more.
• You'll often need to modify this file to configure your project according
to your requirements, such as setting up the database, specifying static
and media file locations, and configuring third-party apps.

2. urls.py:
• This file defines the URL routing for your Django project.
• It maps URLs to views (Python functions that handle HTTP requests).
• You define URL patterns using regular expressions, and when a user
accesses a URL, Django's URL dispatcher uses this file to determine
which view function should handle the request.
• URLs can also be organized into separate apps by creating app-specific
urls.py files.

3. views.py:
• This file contains the view functions for your Django project.
• Views are Python functions that take a web request and return a web
response.
• They are responsible for processing HTTP requests, interacting with
models (if needed), and returning an HTTP response (usually an HTML
page).
• You define views to handle various parts of your application, such as
rendering web pages, handling form submissions, or serving JSON data.

Gujarat Technological University 23 VGEC


5. Building Web Applications with Django Apps

5.1 Create a New Django Project and Django App


• To create a new Django project and Django app, follow the steps given
in Topic 5.1.

5.2 Create Models for Data base


• In Django, models are Python classes that define the structure of your
database tables.
• Define your app's models in the models.py file of your app.

Figure 5.2.1

After defining your models, create and apply migrations to update the
database schema:

Figure 5.2.2

Gujarat Technological University 24 VGEC


5.3 Create Views for Application
• Views are Python functions that handle HTTP requests and return HTTP
responses. Define your app’s views in the views.py file of your app. You
can use Django’s generic views or create custom views based on your
application’s needs.

Figure 5.3.1

5.4 Define URLs for App View


• Create a urls.py file in your app to define the URL patterns for your
app’s views. Then, include these app-specific URLs in your project’s
main urls.py file.

Figure 5.4.1

Gujarat Technological University 25 VGEC


6. Explanation of how to create Register page in
Django

Step 1: Create a Registration View


• In app's views.py, create a view function to handle user registration:

Figure 6.1.1

Step 2: Crete a Registration Template


• Create a template for the registration page in app's templates. Create a
file named register.html and add the following content:

Figure 6.1.2

Step 3: Configure URLs


• In app's urls.py, create a URL pattern for the registration view

Figure 6.1.3

Gujarat Technological University 26 VGEC


Registration Form

Figure 6.1.4

Gujarat Technological University 27 VGEC


7. Explanation of how to create Login page in Django

Step 1: Create a Login Template:


Create an HTML template for the login page in your app’s templates
directory. For example, you can create a file named login.html. This template
will display the login form.

Figure 7.1.1

Step 2: Create a Login View


In app’s views.py, create a view function to handle the login page. This view
will render the login template and handle the form submission.

Figure 7.1.2

Step 3; Create a URL Pattern:


In app’s urls.py, create a URL pattern that maps to the login view. For
example:

Figure 7.1.3

Login Page:

Gujarat Technological University 28 VGEC


Figure 7.1.4

Gujarat Technological University 29 VGEC


Conclusion
In conclusion, my experience working as a Python developer intern for this
Brainybeam has been rewarding and life-changing. My technical knowledge,
personal development, and professional insights have helped me grow and
have helped me become a more competent and self-assured developer. I got
the chance to engage with a talented group of experts, work on projects that
were relevant to the real world, and overcome challenging situations
throughout my internship.

I've become proficient in a number of technical areas, including Python


programming, Django web development, database integration, Git version
control, testing and debugging, front-end development, deployment and
DevOps, and Agile development approaches. These technical abilities have
given me a solid foundation and given me the tools I need to succeed in the
Python programming industry.

My internship experience in Python with Django has been incredibly


valuable and rewarding. Throughout this internship, I have had the
opportunity to learn and grow in various ways, both personally and
professionally. We can also have database tables regarding these in our DB
browser.

Gujarat Technological University 30 VGEC


Reference
MySQL
https://www.talend.com/resources/what-is-mysql/

Django
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Introduction

Python Constructors
https://www.shiksha.com/online-courses/articles/constructors-in-python-definition-types-andrules/

OOPs Concepts
https://www.geeksforgeeks.org/python-oops-concepts/

Gujarat Technological University 31 VGEC

You might also like