SlideShare ist ein Scribd-Unternehmen logo
1 von 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.

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
Madan Karki
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
Kamal Acharya
 

Kürzlich hochgeladen (20)

Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Theory for How to calculation capacitor bank
Theory for How to calculation capacitor bankTheory for How to calculation capacitor bank
Theory for How to calculation capacitor bank
 
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdf
 
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
 
How to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdfHow to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdf
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
 
Electrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineElectrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission line
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 
Introduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and ApplicationsIntroduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and Applications
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
 
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfBURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
 
E-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are presentE-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are present
 
Lesson no16 application of Induction Generator in Wind.ppsx
Lesson no16 application of Induction Generator in Wind.ppsxLesson no16 application of Induction Generator in Wind.ppsx
Lesson no16 application of Induction Generator in Wind.ppsx
 
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.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.

Hinweis der Redaktion

  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.