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
Ad

More Related Content

What's hot (20)

Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
Jay Graves
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
James Casey
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
之宇 趙
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
Ilian Iliev
 
Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...
Edureka!
 
Django Rest Framework - Building a Web API
Django Rest Framework - Building a Web APIDjango Rest Framework - Building a Web API
Django Rest Framework - Building a Web API
Marcos Pereira
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
Bala Kumar
 
Python/Flask Presentation
Python/Flask PresentationPython/Flask Presentation
Python/Flask Presentation
Parag Mujumdar
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
Swarit Wadhe
 
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!
 
Basic Concepts in Python
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
Sumit Satam
 
Introduction to django framework
Introduction to django frameworkIntroduction to django framework
Introduction to django framework
Knoldus Inc.
 
Introduction to Django Rest Framework
Introduction to Django Rest FrameworkIntroduction to Django Rest Framework
Introduction to Django Rest Framework
bangaloredjangousergroup
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
Knoldus Inc.
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python Developers
Rosario Renga
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
Ganga Ram
 
Python OOPs
Python OOPsPython OOPs
Python OOPs
Binay Kumar Ray
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Agung Wahyudi
 
REST Easy with Django-Rest-Framework
REST Easy with Django-Rest-FrameworkREST Easy with Django-Rest-Framework
REST Easy with Django-Rest-Framework
Marcel Chastain
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
Karmatechnologies Pvt. Ltd.
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
Jay Graves
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
James Casey
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
之宇 趙
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
Ilian Iliev
 
Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...
Edureka!
 
Django Rest Framework - Building a Web API
Django Rest Framework - Building a Web APIDjango Rest Framework - Building a Web API
Django Rest Framework - Building a Web API
Marcos Pereira
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
Bala Kumar
 
Python/Flask Presentation
Python/Flask PresentationPython/Flask Presentation
Python/Flask Presentation
Parag Mujumdar
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
Swarit Wadhe
 
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!
 
Basic Concepts in Python
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
Sumit Satam
 
Introduction to django framework
Introduction to django frameworkIntroduction to django framework
Introduction to django framework
Knoldus Inc.
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
Knoldus Inc.
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python Developers
Rosario Renga
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
Ganga Ram
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Agung Wahyudi
 
REST Easy with Django-Rest-Framework
REST Easy with Django-Rest-FrameworkREST Easy with Django-Rest-Framework
REST Easy with Django-Rest-Framework
Marcel Chastain
 

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

Learn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for DevelopersLearn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for Developers
Mars Devs
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
Andolasoft Inc
 
Django framework
Django frameworkDjango framework
Django framework
Arslan Maqsood
 
Django by rj
Django by rjDjango by rj
Django by rj
Shree M.L.Kakadiya MCA mahila college, Amreli
 
Step-by-Step Django Web Development with Python
Step-by-Step Django Web Development with PythonStep-by-Step Django Web Development with Python
Step-by-Step Django Web Development with Python
Shiv Technolabs Pvt. Ltd.
 
Django Framework Interview Guide - Part 1
Django Framework Interview Guide - Part 1Django Framework Interview Guide - Part 1
Django Framework Interview Guide - Part 1
To Sum It Up
 
Why Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdfWhy Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdf
Mindfire LLC
 
What are the basic key points to focus on while learning Full-stack web devel...
What are the basic key points to focus on while learning Full-stack web devel...What are the basic key points to focus on while learning Full-stack web devel...
What are the basic key points to focus on while learning Full-stack web devel...
kzayra69
 
What is Full Stack with Django and how to start learning It.docx
What is Full Stack with Django and how to start learning It.docxWhat is Full Stack with Django and how to start learning It.docx
What is Full Stack with Django and how to start learning It.docx
Technogeeks
 
Django course
Django courseDjango course
Django course
Nagi Annapureddy
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
fantabulous2024
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
Ahmed Salama
 
Django Web Development: Simplifying the Path to Robust Web Applications
Django Web Development: Simplifying the Path to Robust Web ApplicationsDjango Web Development: Simplifying the Path to Robust Web Applications
Django Web Development: Simplifying the Path to Robust Web Applications
Zinavo Pvt Ltd
 
Basic Python Django
Basic Python DjangoBasic Python Django
Basic Python Django
Kaleem Ullah Mangrio
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
Lakshman Prasad
 
Django interview Questions| Edureka
Django interview  Questions| EdurekaDjango interview  Questions| Edureka
Django interview Questions| Edureka
Edureka!
 
Django Unleashed - You are Ultimate Guide to Rapid Web Development.pdf
Django Unleashed - You are Ultimate Guide to Rapid Web Development.pdfDjango Unleashed - You are Ultimate Guide to Rapid Web Development.pdf
Django Unleashed - You are Ultimate Guide to Rapid Web Development.pdf
Cetpa Infotech Pvt Ltd
 
What is Django Technology and How is it Used
What is Django Technology and How is it UsedWhat is Django Technology and How is it Used
What is Django Technology and How is it Used
RiyaBhardwaj51
 
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 Online Training - NareshIT.pdf.pdf
Django Online Training - NareshIT.pdf.pdfDjango Online Training - NareshIT.pdf.pdf
Django Online Training - NareshIT.pdf.pdf
avinashnit
 
Learn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for DevelopersLearn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for Developers
Mars Devs
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
Andolasoft Inc
 
Step-by-Step Django Web Development with Python
Step-by-Step Django Web Development with PythonStep-by-Step Django Web Development with Python
Step-by-Step Django Web Development with Python
Shiv Technolabs Pvt. Ltd.
 
Django Framework Interview Guide - Part 1
Django Framework Interview Guide - Part 1Django Framework Interview Guide - Part 1
Django Framework Interview Guide - Part 1
To Sum It Up
 
Why Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdfWhy Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdf
Mindfire LLC
 
What are the basic key points to focus on while learning Full-stack web devel...
What are the basic key points to focus on while learning Full-stack web devel...What are the basic key points to focus on while learning Full-stack web devel...
What are the basic key points to focus on while learning Full-stack web devel...
kzayra69
 
What is Full Stack with Django and how to start learning It.docx
What is Full Stack with Django and how to start learning It.docxWhat is Full Stack with Django and how to start learning It.docx
What is Full Stack with Django and how to start learning It.docx
Technogeeks
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
fantabulous2024
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
Ahmed Salama
 
Django Web Development: Simplifying the Path to Robust Web Applications
Django Web Development: Simplifying the Path to Robust Web ApplicationsDjango Web Development: Simplifying the Path to Robust Web Applications
Django Web Development: Simplifying the Path to Robust Web Applications
Zinavo Pvt Ltd
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
Lakshman Prasad
 
Django interview Questions| Edureka
Django interview  Questions| EdurekaDjango interview  Questions| Edureka
Django interview Questions| Edureka
Edureka!
 
Django Unleashed - You are Ultimate Guide to Rapid Web Development.pdf
Django Unleashed - You are Ultimate Guide to Rapid Web Development.pdfDjango Unleashed - You are Ultimate Guide to Rapid Web Development.pdf
Django Unleashed - You are Ultimate Guide to Rapid Web Development.pdf
Cetpa Infotech Pvt Ltd
 
What is Django Technology and How is it Used
What is Django Technology and How is it UsedWhat is Django Technology and How is it Used
What is Django Technology and How is it Used
RiyaBhardwaj51
 
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 Online Training - NareshIT.pdf.pdf
Django Online Training - NareshIT.pdf.pdfDjango Online Training - NareshIT.pdf.pdf
Django Online Training - NareshIT.pdf.pdf
avinashnit
 
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)

Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 

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.