SlideShare a Scribd company logo
1 of 27
Microsoft.com/Learn
Join the chat at https://aka.ms/LearnLiveTV
Title
Speaker Name
Get started with Django
Speaker Name
Title
Prerequisites  Software
 Visual Studio Code
 Git
 Skills
 Understanding of HTML and CSS
 Intermediate understanding of Python, including the following concepts:
 Package management
 Virtual environments
 Inheritance
Learning
objectives
 Django concepts
 The difference between Django and Flask
 The best types of applications for Django
 How to create a simple program
Agenda  Introduction
 What is Django?
 Explore basic concepts in Django
 Understand paths and views
 Knowledge check
 Summary
What is Django?
What is Django?
- Django, pronounced "jango," is a free and open-source framework
that was first released in 2005.
- Designed for data-driven applications, where the front-end
provides the user interface for a back-end database
Application types
Django offers a complete framework solution, which means it
provides everything you need to quickly create and deploy your
projects.
• Machine learning
• E-commerce platforms
• Data analysis
• Content management
Django vs. Flask
While both of these frameworks could suit the needs of your next
Python application, there are specific functionalities and levels of
support that each provides.
Django Flask
Full-stack framework Lightweight web framework
Ideal for data-driven applications Ideal for existing APIs and services
Potentially more of a learning curve Potentially less of a learning curve
Out-of-the-box security Additional libraries needed for security
Custom HTML templating engine Jinja HTML templating engine
Exercise
Install Django
Install Django
Creating a Django project is similar to creating any Python application.
• Installation overview
• Create the project folder
• Create and activate the virtual environment
• Django installation
Explore core concepts in Django
Django terminology: projects vs. apps
Project App
Only one project Many apps within the single project.
Contains the settings and apps for a site. Component of a larger website
Projects aren't used in other projects. Apps can be used across multiple projects.
More Django terminology
- Views
- Views contain the code necessary to respond to a user request
- Order details
- Product search
- URL mapping
- Sometimes called routing in other frameworks
- Determines which view to call for a specific URL
- Implemented by using paths
Exercise
Create your first project
Create your first project
Now that we've explored some basic concepts of Django, let's begin
creating the project.
• Create a project with Django-admin
• Explore the project structure
• Run the project
• Create the Hello World app
Exercise
Create paths and views
Create paths and views
With our app structure created, we can begin to take the steps to add
our own custom code.
• Create the view
• Create the route
• Register our URLconf with the project
• Run your first app
Knowledge check
Question 1
What is the command-line utility automatically created in every
Django project?
A. init.py
B. manage.py
C. urls.py
Question 1
What is the command-line utility automatically created in every
Django project?
A. init.py
B. manage.py
C. urls.py
Question 2
What was referred to as a table of contents in the Django app?
A. URLconf
B. runserver
C. project
Question 2
What was referred to as a table of contents in the Django app?
A. URLconf
B. runserver
C. project
Summary
Summary
Although there are many frameworks for the Python language, the
Django framework has proven itself a worthy opponent for
developing applications.
• Why Django is great for rapid deployments.
• The difference between Django and Flask.
• The types of applications best for Django.
• How to install Django.
• How to create a simple program.
Next steps
- Building data driven websites with Django
- https://aka.ms/learn-django
- Deploy a Python web app with PostgreSQL in Azure
© Copyright Microsoft Corporation. All rights reserved.

More Related Content

Similar to Concepts and applications of Django.pptx

Pluggable patterns
Pluggable patternsPluggable patterns
Pluggable patterns
Corey Oordt
 
Django Article V0
Django Article V0Django Article V0
Django Article V0
Udi Bauman
 

Similar to Concepts and applications of Django.pptx (20)

Ramya devi R internet of things
Ramya devi R internet of thingsRamya devi R internet of things
Ramya devi R internet of things
 
Top 10 python frameworks for web development in 2020
Top 10 python frameworks for web development in 2020Top 10 python frameworks for web development in 2020
Top 10 python frameworks for web development in 2020
 
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
 
Django interview Questions| Edureka
Django interview  Questions| EdurekaDjango interview  Questions| Edureka
Django interview Questions| Edureka
 
Pluggable patterns
Pluggable patternsPluggable patterns
Pluggable patterns
 
Django
DjangoDjango
Django
 
Hiring Django Developers for Success.pdf
Hiring Django Developers for Success.pdfHiring Django Developers for Success.pdf
Hiring Django Developers for Success.pdf
 
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdfDjango Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
 
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
 
Django
DjangoDjango
Django
 
Django
Django Django
Django
 
Django Article V0
Django Article V0Django Article V0
Django Article V0
 
python full stack course in hyderabad...
python full stack course in hyderabad...python full stack course in hyderabad...
python full stack course in hyderabad...
 
python full stack course in hyderabad...
python full stack course in hyderabad...python full stack course in hyderabad...
python full stack course in hyderabad...
 
Django Documentation
Django DocumentationDjango Documentation
Django Documentation
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Advantages Of Using Django Framework To Build Scalable.pdf
Advantages Of Using Django Framework To Build Scalable.pdfAdvantages Of Using Django Framework To Build Scalable.pdf
Advantages Of Using Django Framework To Build Scalable.pdf
 
Django
DjangoDjango
Django
 
Akash rajguru project report sem v
Akash rajguru project report sem vAkash rajguru project report sem v
Akash rajguru project report sem v
 
Noman Khan Internship Report 2.pptx
Noman Khan Internship Report 2.pptxNoman Khan Internship Report 2.pptx
Noman Khan Internship Report 2.pptx
 

Recently uploaded

Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
meharikiros2
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 

Recently uploaded (20)

Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 

Concepts and applications of Django.pptx

  • 2. Join the chat at https://aka.ms/LearnLiveTV Title Speaker Name Get started with Django Speaker Name Title
  • 3. Prerequisites  Software  Visual Studio Code  Git  Skills  Understanding of HTML and CSS  Intermediate understanding of Python, including the following concepts:  Package management  Virtual environments  Inheritance
  • 4. Learning objectives  Django concepts  The difference between Django and Flask  The best types of applications for Django  How to create a simple program
  • 5. Agenda  Introduction  What is Django?  Explore basic concepts in Django  Understand paths and views  Knowledge check  Summary
  • 7. What is Django? - Django, pronounced "jango," is a free and open-source framework that was first released in 2005. - Designed for data-driven applications, where the front-end provides the user interface for a back-end database
  • 8. Application types Django offers a complete framework solution, which means it provides everything you need to quickly create and deploy your projects. • Machine learning • E-commerce platforms • Data analysis • Content management
  • 9. Django vs. Flask While both of these frameworks could suit the needs of your next Python application, there are specific functionalities and levels of support that each provides. Django Flask Full-stack framework Lightweight web framework Ideal for data-driven applications Ideal for existing APIs and services Potentially more of a learning curve Potentially less of a learning curve Out-of-the-box security Additional libraries needed for security Custom HTML templating engine Jinja HTML templating engine
  • 11. Install Django Creating a Django project is similar to creating any Python application. • Installation overview • Create the project folder • Create and activate the virtual environment • Django installation
  • 13. Django terminology: projects vs. apps Project App Only one project Many apps within the single project. Contains the settings and apps for a site. Component of a larger website Projects aren't used in other projects. Apps can be used across multiple projects.
  • 14. More Django terminology - Views - Views contain the code necessary to respond to a user request - Order details - Product search - URL mapping - Sometimes called routing in other frameworks - Determines which view to call for a specific URL - Implemented by using paths
  • 16. Create your first project Now that we've explored some basic concepts of Django, let's begin creating the project. • Create a project with Django-admin • Explore the project structure • Run the project • Create the Hello World app
  • 18. Create paths and views With our app structure created, we can begin to take the steps to add our own custom code. • Create the view • Create the route • Register our URLconf with the project • Run your first app
  • 20. Question 1 What is the command-line utility automatically created in every Django project? A. init.py B. manage.py C. urls.py
  • 21. Question 1 What is the command-line utility automatically created in every Django project? A. init.py B. manage.py C. urls.py
  • 22. Question 2 What was referred to as a table of contents in the Django app? A. URLconf B. runserver C. project
  • 23. Question 2 What was referred to as a table of contents in the Django app? A. URLconf B. runserver C. project
  • 25. Summary Although there are many frameworks for the Python language, the Django framework has proven itself a worthy opponent for developing applications. • Why Django is great for rapid deployments. • The difference between Django and Flask. • The types of applications best for Django. • How to install Django. • How to create a simple program.
  • 26. Next steps - Building data driven websites with Django - https://aka.ms/learn-django - Deploy a Python web app with PostgreSQL in Azure
  • 27. © Copyright Microsoft Corporation. All rights reserved.

Editor's Notes

  1. Link to published module on Learn: https://docs.microsoft.com/en-us/learn/modules/learn-pr/
  2. Django, pronounced "jango," is a free and open-source framework that was first released in 2005. Django was named after the famous jazz guitarist Django Reinhardt. Over the years, many Python frameworks have been developed, but Django has become one of the most popular because of its flexibility and security. Django is suitable for both front-end and back-end web development. The integrated Python libraries make it easy for rapid development. Django has become widely accepted across industries. Because of its growing popularity, providers are more readily available to support Django applications on their platforms. Designed for data-driven applications, where the front-end provides the user interface for a back-end database
  3. Django offers a complete framework solution, which means it provides everything you need to quickly deploy your projects. Django offers great out-of-the-box security, a vast community of users, and can scale on demand. For these reasons, it's considered a framework of choice by many developers. By using Django, you can develop complex and database-driven web applications that can include: Machine learning E-commerce platforms Data analysis Content management
  4. While both of these frameworks could suit the needs of your next Python application, there are specific functionalities and levels of support that each provides. Let's quickly go through the differences. [Table was here] Django and Flask both offer great benefits for your projects. Depending on the time requirements for app development, one might be better suited than the other. When you choose a framework, consider the type and complexity of the application and also the end product.
  5. Link to published module on Learn: https://docs.microsoft.com/en-us/learn/modules/learn-pr/3-exercise-install-django
  6. https://docs.microsoft.com/en-us/learn/modules/learn-pr/3-exercise-install-django
  7. The difference between a Project and an App can be a bit confusing for first-time Django developers. The key concept to keep in mind is that a Django site will only have one project. The project is used to configure any site wide information, and handles the global routing table. Apps are contained inside of a project, and are where the code exists to respond to user requests and provide functionality.
  8. Views in Django are responsible for accepting a user request and responding to it. A view will contain the necessary code to communicate with a database or perform other actions on the user's behalf. URL mapping is the process of taking the URL a user has entered by clicking on a button or a link and mapping it to the correct view. This is done through paths, which is how the URLs are identified.
  9. Link to published module on Learn: https://docs.microsoft.com/en-us/learn/modules/learn-pr/5-exercise-first-project
  10. https://docs.microsoft.com/en-us/learn/modules/learn-pr/5-exercise-first-project
  11. For this exercise there are a few file updates required. Spend a bit of extra time with the demo to ensure Link to published module on Learn: https://docs.microsoft.com/en-us/learn/modules/learn-pr/7-exercise-create-paths-views
  12. https://docs.microsoft.com/en-us/learn/modules/learn-pr/7-exercise-create-paths-views
  13. Explanation: Correct!
  14. Explanation: Correct!
  15. Explanation: Correct!
  16. Explanation: Correct!
  17. Although there are many frameworks for the Python language, the Django framework has proven itself a worthy opponent for developing applications. By installing the Django framework, creating a new project, and deploying your first app, the journey has only just begun. Continue through this learning path to find all of the beneficial features of the Django framework and decide if you'll add Django to your tool belt for developing apps. In this module, you learned: Why Django is great for rapid deployments. The difference between Django and Flask. The types of applications best for Django. How to install Django. How to create a simple program.