SlideShare a Scribd company logo
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Agenda
Why Django framework?
What is Django?
Architecture: MVC-MVT Pattern
Hands On: Get Started With Django
Building Blocks of Django
Project: A Web Application
1
2
3
4
5
6
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Django Framework?
First, let’s understand how Django came into existence
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Django Framework?
❑ Django is a Python web framework
❑ A framework provides a structure and common methods to make the life of a web application
developer much easier for building flexible, scalable and maintainable web applications
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Django Framework?
➢ A Python web framework is a code library that provide
tools and libraries to simplify common web development
operations.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What is Django?
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What is Django?
Django is a high-level and has a MVC-
MVT styled architecture.
Django web framework is written on
quick and powerful Python language.
Django has a open-source collection of
libraries for building a fully functioning
web application.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Features of Django
F U L LY L O A D E D
F A S T
S E C U R E
S C A L A B L E
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Django MVC-MVT Pattern
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Django MVC-MVT Pattern
➢ MVC is slightly different from MVT as Django itself takes care of the Controller part.
➢ It leaves the template which is a HTML file mixed with Django Template Language (DTL).
Model View Template
Model
View
Controller
Request
MVC MVT
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Model View Controller
The developer provides the Model, the view and the template then just maps it to a URL
and Django does the magic to serve it to the user.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Hands on
Now, let’s create a basic Web App
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Installation
Go to the link:
https://www.djangoproject.
com/download/
1
2 Install the latest
version of Django
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Create a Project
$ django-admin startproject firstproject
Open the terminal and navigate to the folder where the project is to be created.
Firstproject/
manage.py
firstproject/
__init__.py
settings.py
urls.py
wsgi.py
This will create a "myproject" folder with the following structure:
1
2
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Project Structure
“firstproject” folder is just your project container or
directory. You can rename it to anything you like.
firstproject/
firstproject
__init__.py
settings.py
urls.py
wsgi.py
manage.py
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Project Structure
This folder is the actual python package of your project
which contains some default files.
firstproject/
firstproject
__init__.py
settings.py
urls.py
wsgi.py
manage.py
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Project Structure
It is an empty file that tells python that this folder
should be treated as package.
firstproject/
firstproject
__init__.py
settings.py
urls.py
wsgi.py
manage.py
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Project Structure
This contains the settings or the configurations of the
project.
firstproject/
firstproject
__init__.py
settings.py
urls.py
wsgi.py
manage.py
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Project Structure
This file contains all the links of your project and the
function to call.
firstproject/
firstproject
__init__.py
settings.py
urls.py
wsgi.py
manage.py
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Project Structure
It is an entry point for WSGI-compatible web services to
serve your project.
firstproject/
firstproject
__init__.py
settings.py
urls.py
wsgi.py
manage.py
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Project Structure
It is a command line utility that lets you interact with the
Django project.
firstproject/
firstproject
__init__.py
settings.py
urls.py
wsgi.py
manage.py
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Your First Web App
Congratulations! We have successful created a basic
Web App.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Components of Django
Now, let’s understand the components/ building blocks of Django
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Building Blocks of Django
ORM
URLs and Views
Templates
Forms
Authentication
Admin
Internationalization
Security
ORM stands for Object-relational Mapper.
Define your data models. You get a rich, dynamic
database-access API for free but you can still write
SQL if needed.
from django.db import models
Class employees(models.Model):
firstname = models.CharField(max_length=10)
Lastname = models.CharField(max_length=10)
def _str_(self):
return self.firstname
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
URLs and Views
ORM
Templates
Forms
Authentication
Admin
Internationalization
Security
Like a table of contents for your app, it contains a
simple mapping between URL patterns and your
views.
from Django.shortcuts import
render
def index(request):
return HttpResponse
(<h2> Hey! Welcome to Django
tutorial</h2>)
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
URL
Mapping views and URL
Building Blocks of Django
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Building Blocks of Django
Templates
ORM
URLs and Views
Forms
Authentication
Admin
Internationalization
Security
Templates are designed to feel comfortable and
for those who work with HTML, like designers and
front-end developers.
TEMPLATE_DIRS = (
'<workspace>/django_project/templates/',
)
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Building Blocks of Django
Forms
ORM
URLs and Views
Templates
Authentication
Admin
Internationalization
Security
Django provides a powerful form library that handles
rendering forms as HTML, validating user-submitted
data, and converting that data to native Python types.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Building Blocks of Django
Authentication
ORM
URLs and Views
Templates
Forms
Admin
Internationalization
Security
It handles user accounts, groups, permissions and
cookie-based user sessions.
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
@login_required
def my_protected_view(request):
return render(request, 'protected.html', {'current_user':
request.user})
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Building Blocks of Django
Admin
ORM
URLs and Views
Templates
Forms
Authentication
Internationalization
Security
It is the most powerful part that reads metadata in
your models to provide a powerful and
production-ready interface that can be used to
manage content on your site.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Building Blocks of Django
Internationalization
ORM
URLs and Views
Templates
Forms
Authentication
Admin
Security
Django offers full support for translating text into
different languages, plus locale-specific
formatting of dates, times, numbers and time
zones.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Building Blocks of Django
Security
ORM
URLs and Views
Templates
Forms
Authentication
Admin
Internationalization
✓ Clickjacking
✓ Cross-site scripting
✓ Cross Site Request Forgery (CSRF)
✓ SQL injection
✓ Remote code execution
Django provides multiple protections against:
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Project
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Session In A Minute
Django Framework
ProjectComponentsHands On
ArchitectureWhat is Django
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Django Tutorial | Django Web Development With Python | Django Training and Certification | Edureka

More Related Content

What's hot (20)

Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
之宇 趙
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
Ilian Iliev
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
Bala Kumar
 
Django for Beginners
Django for BeginnersDjango for Beginners
Django for Beginners
Jason Davies
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
James Casey
 
Introdução APIs RESTful
Introdução APIs RESTfulIntrodução APIs RESTful
Introdução APIs RESTful
Douglas V. Pasqua
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...
Zhe Li
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
Michael Pirnat
 
Angular js PPT
Angular js PPTAngular js PPT
Angular js PPT
Imtiyaz Ahmad Khan
 
Express js
Express jsExpress js
Express js
Manav Prasad
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
ritika1
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
Singsys Pte Ltd
 
Selenium IDE LOCATORS
Selenium IDE LOCATORSSelenium IDE LOCATORS
Selenium IDE LOCATORS
Mindfire Solutions
 
Angular
AngularAngular
Angular
Lilia Sfaxi
 
Angular 8
Angular 8 Angular 8
Angular 8
Sunil OS
 
Angular modules in depth
Angular modules in depthAngular modules in depth
Angular modules in depth
Christoffer Noring
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
Kishimi Ibrahim Ishaq
 
Javascript
JavascriptJavascript
Javascript
Manav Prasad
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
Mindy McAdams
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
Haiqi Chen
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
之宇 趙
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
Ilian Iliev
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
Bala Kumar
 
Django for Beginners
Django for BeginnersDjango for Beginners
Django for Beginners
Jason Davies
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
James Casey
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...
Zhe Li
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
Michael Pirnat
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
ritika1
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
Singsys Pte Ltd
 
Angular 8
Angular 8 Angular 8
Angular 8
Sunil OS
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
Mindy McAdams
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
Haiqi Chen
 

Similar to Django Tutorial | Django Web Development With Python | Django Training and Certification | Edureka (20)

What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
Edureka!
 
Web development django.pdf
Web development django.pdfWeb development django.pdf
Web development django.pdf
KomalSaini178773
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
Ahmed Salama
 
Basic Python Django
Basic Python DjangoBasic Python Django
Basic Python Django
Kaleem Ullah Mangrio
 
Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)
Nishant Soni
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
Andolasoft Inc
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics Presentation
Shrinath Shenoy
 
Django
DjangoDjango
Django
sisibeibei
 
Introduction to django framework
Introduction to django frameworkIntroduction to django framework
Introduction to django framework
Knoldus Inc.
 
Django Documentation
Django DocumentationDjango Documentation
Django Documentation
Ying wei (Joe) Chou
 
A gentle intro to the Django Framework
A gentle intro to the Django FrameworkA gentle intro to the Django Framework
A gentle intro to the Django Framework
Ricardo Soares
 
Akash rajguru project report sem v
Akash rajguru project report sem vAkash rajguru project report sem v
Akash rajguru project report sem v
Akash Rajguru
 
Django course
Django courseDjango course
Django course
Nagi Annapureddy
 
django_introduction20141030
django_introduction20141030django_introduction20141030
django_introduction20141030
Kevin Wu
 
Django by rj
Django by rjDjango by rj
Django by rj
Shree M.L.Kakadiya MCA mahila college, Amreli
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
 
Tango with django
Tango with djangoTango with django
Tango with django
Rajan Kumar Upadhyay
 
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
Edureka!
 
Web development django.pdf
Web development django.pdfWeb development django.pdf
Web development django.pdf
KomalSaini178773
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
Ahmed Salama
 
Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)
Nishant Soni
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
Andolasoft Inc
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics Presentation
Shrinath Shenoy
 
Introduction to django framework
Introduction to django frameworkIntroduction to django framework
Introduction to django framework
Knoldus Inc.
 
A gentle intro to the Django Framework
A gentle intro to the Django FrameworkA gentle intro to the Django Framework
A gentle intro to the Django Framework
Ricardo Soares
 
Akash rajguru project report sem v
Akash rajguru project report sem vAkash rajguru project report sem v
Akash rajguru project report sem v
Akash Rajguru
 
django_introduction20141030
django_introduction20141030django_introduction20141030
django_introduction20141030
Kevin Wu
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
 
Ad

More from Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 
Ad

Recently uploaded (20)

Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdfCrypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Cisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdfCisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdf
superdpz
 
TimeSeries Machine Learning - PyData London 2025
TimeSeries Machine Learning - PyData London 2025TimeSeries Machine Learning - PyData London 2025
TimeSeries Machine Learning - PyData London 2025
Suyash Joshi
 
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME FlowProviding an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Ben Blair - Operating Safely in a Vibe Coding World
Ben Blair - Operating Safely in a Vibe Coding WorldBen Blair - Operating Safely in a Vibe Coding World
Ben Blair - Operating Safely in a Vibe Coding World
AWS Chicago
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdfCrypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Cisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdfCisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdf
superdpz
 
TimeSeries Machine Learning - PyData London 2025
TimeSeries Machine Learning - PyData London 2025TimeSeries Machine Learning - PyData London 2025
TimeSeries Machine Learning - PyData London 2025
Suyash Joshi
 
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME FlowProviding an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Ben Blair - Operating Safely in a Vibe Coding World
Ben Blair - Operating Safely in a Vibe Coding WorldBen Blair - Operating Safely in a Vibe Coding World
Ben Blair - Operating Safely in a Vibe Coding World
AWS Chicago
 

Django Tutorial | Django Web Development With Python | Django Training and Certification | Edureka

  • 1. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
  • 2. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Agenda Why Django framework? What is Django? Architecture: MVC-MVT Pattern Hands On: Get Started With Django Building Blocks of Django Project: A Web Application 1 2 3 4 5 6
  • 3. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Django Framework? First, let’s understand how Django came into existence
  • 4. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Django Framework? ❑ Django is a Python web framework ❑ A framework provides a structure and common methods to make the life of a web application developer much easier for building flexible, scalable and maintainable web applications
  • 5. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Django Framework? ➢ A Python web framework is a code library that provide tools and libraries to simplify common web development operations.
  • 6. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What is Django?
  • 7. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What is Django? Django is a high-level and has a MVC- MVT styled architecture. Django web framework is written on quick and powerful Python language. Django has a open-source collection of libraries for building a fully functioning web application.
  • 8. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Features of Django F U L LY L O A D E D F A S T S E C U R E S C A L A B L E
  • 9. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Django MVC-MVT Pattern
  • 10. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Django MVC-MVT Pattern ➢ MVC is slightly different from MVT as Django itself takes care of the Controller part. ➢ It leaves the template which is a HTML file mixed with Django Template Language (DTL). Model View Template Model View Controller Request MVC MVT
  • 11. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Model View Controller The developer provides the Model, the view and the template then just maps it to a URL and Django does the magic to serve it to the user.
  • 12. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Hands on Now, let’s create a basic Web App
  • 13. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Installation Go to the link: https://www.djangoproject. com/download/ 1 2 Install the latest version of Django
  • 14. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Create a Project $ django-admin startproject firstproject Open the terminal and navigate to the folder where the project is to be created. Firstproject/ manage.py firstproject/ __init__.py settings.py urls.py wsgi.py This will create a "myproject" folder with the following structure: 1 2
  • 15. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Project Structure “firstproject” folder is just your project container or directory. You can rename it to anything you like. firstproject/ firstproject __init__.py settings.py urls.py wsgi.py manage.py
  • 16. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Project Structure This folder is the actual python package of your project which contains some default files. firstproject/ firstproject __init__.py settings.py urls.py wsgi.py manage.py
  • 17. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Project Structure It is an empty file that tells python that this folder should be treated as package. firstproject/ firstproject __init__.py settings.py urls.py wsgi.py manage.py
  • 18. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Project Structure This contains the settings or the configurations of the project. firstproject/ firstproject __init__.py settings.py urls.py wsgi.py manage.py
  • 19. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Project Structure This file contains all the links of your project and the function to call. firstproject/ firstproject __init__.py settings.py urls.py wsgi.py manage.py
  • 20. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Project Structure It is an entry point for WSGI-compatible web services to serve your project. firstproject/ firstproject __init__.py settings.py urls.py wsgi.py manage.py
  • 21. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Project Structure It is a command line utility that lets you interact with the Django project. firstproject/ firstproject __init__.py settings.py urls.py wsgi.py manage.py
  • 22. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Your First Web App Congratulations! We have successful created a basic Web App.
  • 23. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Components of Django Now, let’s understand the components/ building blocks of Django
  • 24. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Building Blocks of Django ORM URLs and Views Templates Forms Authentication Admin Internationalization Security ORM stands for Object-relational Mapper. Define your data models. You get a rich, dynamic database-access API for free but you can still write SQL if needed. from django.db import models Class employees(models.Model): firstname = models.CharField(max_length=10) Lastname = models.CharField(max_length=10) def _str_(self): return self.firstname
  • 25. Copyright © 2017, edureka and/or its affiliates. All rights reserved. URLs and Views ORM Templates Forms Authentication Admin Internationalization Security Like a table of contents for your app, it contains a simple mapping between URL patterns and your views. from Django.shortcuts import render def index(request): return HttpResponse (<h2> Hey! Welcome to Django tutorial</h2>) from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), ] URL Mapping views and URL Building Blocks of Django
  • 26. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Building Blocks of Django Templates ORM URLs and Views Forms Authentication Admin Internationalization Security Templates are designed to feel comfortable and for those who work with HTML, like designers and front-end developers. TEMPLATE_DIRS = ( '<workspace>/django_project/templates/', )
  • 27. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Building Blocks of Django Forms ORM URLs and Views Templates Authentication Admin Internationalization Security Django provides a powerful form library that handles rendering forms as HTML, validating user-submitted data, and converting that data to native Python types.
  • 28. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Building Blocks of Django Authentication ORM URLs and Views Templates Forms Admin Internationalization Security It handles user accounts, groups, permissions and cookie-based user sessions. from django.contrib.auth.decorators import login_required from django.shortcuts import render @login_required def my_protected_view(request): return render(request, 'protected.html', {'current_user': request.user})
  • 29. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Building Blocks of Django Admin ORM URLs and Views Templates Forms Authentication Internationalization Security It is the most powerful part that reads metadata in your models to provide a powerful and production-ready interface that can be used to manage content on your site.
  • 30. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Building Blocks of Django Internationalization ORM URLs and Views Templates Forms Authentication Admin Security Django offers full support for translating text into different languages, plus locale-specific formatting of dates, times, numbers and time zones.
  • 31. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Building Blocks of Django Security ORM URLs and Views Templates Forms Authentication Admin Internationalization ✓ Clickjacking ✓ Cross-site scripting ✓ Cross Site Request Forgery (CSRF) ✓ SQL injection ✓ Remote code execution Django provides multiple protections against:
  • 32. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Project
  • 33. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Session In A Minute Django Framework ProjectComponentsHands On ArchitectureWhat is Django
  • 34. Copyright © 2017, edureka and/or its affiliates. All rights reserved.