Chapter 15 Creating A DJANGO Based Basic Web Application
Chapter 15 Creating A DJANGO Based Basic Web Application
Unit I
DATA MANAGEMENT ( DM – II)
(20 Theory + 20 Practical)
Prepared by
Praveen M Jigajinni
DCSc & Engg, PGDCA,ADCA,MCA.MSc(IT),Mtech(IT),MPhil (Comp. Sci)
What is Library?
Framework
Library
1. The Library does not defines the
architecture of your code. It makes no
assumption on how your app is structured, it just
gives you a patch function to apply.
Difference between Framework and Library
Framework
Library
Framework
Library
Framework
Library
The library on the other hand is somewhat
like as if you are building your own house but you
are using some predesigned doors and windows.
Popular Python Frameworks
Popular Python Frameworks
Popular Python Frameworks
CHERRYPY
Popular Python Frameworks
Popular Python Frameworks
WEBWARE
Popular Python Frameworks
PYLONS
Popular Python Frameworks
Popular Python Frameworks
Popular Python Frameworks
Dash
Popular Python Frameworks
Popular Python Frameworks
Popular Python Frameworks
Popular Python Frameworks
Popular Python Frameworks
Hug
Popular Python Frameworks
Popular Python Frameworks
Popular Python Frameworks
SANIC
Popular Python Frameworks
TORNADO
Popular Python Frameworks
Turbogears
Popular Python Frameworks
AIOhttp
Popular Python Frameworks
SELENIUM
Popular Python Frameworks
Googleapp Engine
Popular Python Frameworks
ROBOT
Popular Python Frameworks
Popular Python Frameworks
How Web, Website and Web Application Work?
How Web, Website and Web Application Work?
What is DJANGO?
What is DJANGO?
Simon is a co-creator of
the Django Web framework and is
a frequent public speaker.
What does the name Django mean?
What does the name Django mean?
Django Reinhardt
(23 January 1910 – 16 May 1953)
Why DJANGO?
Why DJANGO?
Versatile
Why Django?
NEWS PAPER
Installing Django
Installing Django
mkvirtualenv mywebsite
3] To activate the environment mywebsite we
have to run the following command.
workon mywebsite
Installing Django(online)
py -m django --version
Django Offline Installation Steps
1. Project
2. An App
Set-ExecutionPolicy RemoteSigned
Localhost:8000
Or
127.0.0.1:8000
OR
SSA1 Folder
1. __init__.py
2. settings.py
3. urls.py
4. wsgi.py
SKELETON/ STRUCTURE OF DJANGO PROJECT
1. __init__.py
3. urls.py
3. urls.py
OUTER PROJECT
1. admin.py 5. views.py
2. apps.py 6. __init__.py
3. models.py 7. migrations/
4. tests.py
Creating Apps of a Django Project
7. migrations/
2. Template
3. View
4. Controller
Understanding Django Project Architecture
1. Model
This component is responsible for data
management. This deals with data access,
validation and relationships among the data.
The models defined in Django are mapped into
database tables.
2. Template
This component is responsible
presentation of data/ webpage to the user/
client.
Understanding Django Project Architecture
3. View
Django view acts like a bridge between
models and templates. A view access model data
and redirects it to a templates for presentation
4. Controller
It is the logic tier provided by the Django
framework and it links the components of Django
architecture i.e model,view and template. It
passes data for display from model to template
via view.
Understanding Django Project Architecture
Understanding Django Project Architecture
Register Apps
Register Apps