SlideShare a Scribd company logo
1 of 47
Download to read offline
Web framework
What is a Web Framework?
A web framework is a server-side application framework ,
that is designed to support the development of
* dynamic websites
* web applications
* web services and
* resources
More about web Framework
• A Python web framework is a code library,
• that makes the life of a web application developer much easier
• for building flexible, scalable and maintainable web
applications.
• A web development framework is a set of resources and tools for
software developers to build and manage web applications,
web services and websites.
Why Django ?
• Tight Integration between Components
• Object-Relational Mapper (ORM)
• Automatic Administration Interface Multi-Lingual Support
Introduction to Django framework.
There are following frameworks in Python.
• Django
• CherryPy
• pylons
• Flask
• Bottle
• Pyramid
• Cubic Web
• GAE framework
What is Django Framework ?
• Django is basically a high-level Python web application
framework that enables the rapid development of web
applications.
• It achieves so with pragmatic, much cleaner design in
comparison of other frameworks.
• Django takes care of the difficult stuff so that you can
concentrate on building your web applications.
MVT Pattern
• How does Django Work?
• Django follows the MVT design pattern (Model View Template).
• MVT stands for Model – View – Template.
• MVT architecture is the software design pattern used by the
Django web framework.
Model
• In Django, the data is delivered as an Object Relational
Mapping (ORM)
• which is a technique designed to make it easier to work with
databases.
• Django, with ORM, makes it easier to communicate with the
database, without having to write complex SQL statements.
View
• A view is a function or method that takes
• http requests as arguments
• imports the relevant model(s)
• and finds out what data to send to the template
• and returns the final result.
• The views are usually located in a file called views.py.
Templates
• A template is a file where you describe how the result should be
represented.
• Templates are often .html files, with HTML code describing the layout of
a web page.
• but it can also be in other file formats to present other results, but here
we will concentrate on .html files.
URLs
• When a user requests a URL, Django decides which view it will send it
to.
• This is done in a file called urls.py.
Installation
• Django can be easily install using python's package manager.
• before installation of django you must have python and pip.
• first open the terminal and execute the following commands for
installation.
• pip install django
Project
• Create a project in django
• open the terminal and navigate a folder in your system where
you want to create a project.
• Django-admin startproject djangoProject
• this command will create a project named "djangoProject" in
your folder.
• and here is your first django project.
Project
• creating Home page using django framework.
• open the terminal and navigate a folder in your system where
you want to create a project.
• django-admin startproject HomeProject
• cd HomeProject
• Create app of our project
– python manage.py startapp myapp
– code .
– it will open the project in coding app in your system.
Application Register
• create a folder named "Templates" in Application.
• After creating Templates create a new file named "home.html".
• After creating a file make their view in views.py.
• create a url for http response.
• Then run your project using this commands
• Open new terminal
– python manage.py runserver
– follow the link.
And here is your project
Creating a webApp
• Creating navbar of webapp
• Code for navbar
• Adding data in web app using django models
– Create a model in floder named “models.py”
• Model Migrations
– Open new terminal and execute the following commands
– Python manage.py makemigrations
• - python manage.py migrate
Model Registration
• Open a folder named “admin.py” in application
– Import the created Model in admin.py.
– Register the model
• Import the model in views.py
• Adding content using cards
• Defined code for image & card
Cards
• Adding content
• Footer for webapp
• Creating footer for project
Admin-panel in Django
• Creating admin panel of webapp
– Open new terminal and follow the given commands
– Python manage.py createsuperuser
Admin panel
• Added data in panel
• Adding dynamic data to web using MVT architecture.
• Creating template for Page
• Create html file in folder named “Templates” in application
– And follow the code
• Creating a view for template
– Click to python file named views.py
– And create the view for template
• Getting URL for specific created http response(view)
– Click to python file named Urls.py
– Add views from application
– And give a path
Static
• Adding Static files in web app
– Click to settings.py and follow the defined code
• Then move to urls.py and follow the steps for static image
Thank you
304 Aditya Arcade,
Nr. Choice Restaurant
CG Road
Ahmedabad
Contact 9537344018
www.codingcloudinstitute.com

More Related Content

Similar to Web development django.pdf

Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino DesignerPaul Withers
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectJadson Santos
 
Concepts and applications of Django.pptx
Concepts and applications of Django.pptxConcepts and applications of Django.pptx
Concepts and applications of Django.pptxsushmitjivtode4
 
Drupal8 for Symfony developers - Dutch PHP
Drupal8 for Symfony developers - Dutch PHPDrupal8 for Symfony developers - Dutch PHP
Drupal8 for Symfony developers - Dutch PHPAntonio Peric-Mazar
 
Front end for back end developers
Front end for back end developersFront end for back end developers
Front end for back end developersWojciech Bednarski
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Antonio Peric-Mazar
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to DjangoKnoldus Inc.
 
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...Perficient, Inc.
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and ArchitectureAndolasoft Inc
 
Akash rajguru project report sem v
Akash rajguru project report sem vAkash rajguru project report sem v
Akash rajguru project report sem vAkash Rajguru
 
Introduction to Python and Django
Introduction to Python and DjangoIntroduction to Python and Django
Introduction to Python and Djangosolutionstreet
 
Django interview Questions| Edureka
Django interview  Questions| EdurekaDjango interview  Questions| Edureka
Django interview Questions| EdurekaEdureka!
 
Intro to Web Development Using Python and Django
Intro to Web Development Using Python and DjangoIntro to Web Development Using Python and Django
Intro to Web Development Using Python and DjangoChariza Pladin
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to djangoIlian Iliev
 

Similar to Web development django.pdf (20)

Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
 
Concepts and applications of Django.pptx
Concepts and applications of Django.pptxConcepts and applications of Django.pptx
Concepts and applications of Django.pptx
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
Why Django for Web Development
Why Django for Web DevelopmentWhy Django for Web Development
Why Django for Web Development
 
Drupal8 for Symfony developers - Dutch PHP
Drupal8 for Symfony developers - Dutch PHPDrupal8 for Symfony developers - Dutch PHP
Drupal8 for Symfony developers - Dutch PHP
 
Front end for back end developers
Front end for back end developersFront end for back end developers
Front end for back end developers
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Codeigniter framework
Codeigniter framework Codeigniter framework
Codeigniter framework
 
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
 
divyanshBajaj.pptx
divyanshBajaj.pptxdivyanshBajaj.pptx
divyanshBajaj.pptx
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
 
Akash rajguru project report sem v
Akash rajguru project report sem vAkash rajguru project report sem v
Akash rajguru project report sem v
 
Introduction to Python and Django
Introduction to Python and DjangoIntroduction to Python and Django
Introduction to Python and Django
 
Django interview Questions| Edureka
Django interview  Questions| EdurekaDjango interview  Questions| Edureka
Django interview Questions| Edureka
 
Django by rj
Django by rjDjango by rj
Django by rj
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
Intro to Web Development Using Python and Django
Intro to Web Development Using Python and DjangoIntro to Web Development Using Python and Django
Intro to Web Development Using Python and Django
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 

Recently uploaded (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 

Web development django.pdf

  • 1.
  • 2. Web framework What is a Web Framework? A web framework is a server-side application framework , that is designed to support the development of * dynamic websites * web applications * web services and * resources
  • 3. More about web Framework • A Python web framework is a code library, • that makes the life of a web application developer much easier • for building flexible, scalable and maintainable web applications. • A web development framework is a set of resources and tools for software developers to build and manage web applications, web services and websites.
  • 4. Why Django ? • Tight Integration between Components • Object-Relational Mapper (ORM) • Automatic Administration Interface Multi-Lingual Support
  • 5. Introduction to Django framework. There are following frameworks in Python. • Django • CherryPy • pylons • Flask • Bottle • Pyramid • Cubic Web • GAE framework
  • 6. What is Django Framework ? • Django is basically a high-level Python web application framework that enables the rapid development of web applications. • It achieves so with pragmatic, much cleaner design in comparison of other frameworks. • Django takes care of the difficult stuff so that you can concentrate on building your web applications.
  • 7. MVT Pattern • How does Django Work? • Django follows the MVT design pattern (Model View Template). • MVT stands for Model – View – Template. • MVT architecture is the software design pattern used by the Django web framework.
  • 8. Model • In Django, the data is delivered as an Object Relational Mapping (ORM) • which is a technique designed to make it easier to work with databases. • Django, with ORM, makes it easier to communicate with the database, without having to write complex SQL statements.
  • 9. View • A view is a function or method that takes • http requests as arguments • imports the relevant model(s) • and finds out what data to send to the template • and returns the final result. • The views are usually located in a file called views.py.
  • 10. Templates • A template is a file where you describe how the result should be represented. • Templates are often .html files, with HTML code describing the layout of a web page. • but it can also be in other file formats to present other results, but here we will concentrate on .html files. URLs • When a user requests a URL, Django decides which view it will send it to. • This is done in a file called urls.py.
  • 11. Installation • Django can be easily install using python's package manager. • before installation of django you must have python and pip. • first open the terminal and execute the following commands for installation. • pip install django
  • 12. Project • Create a project in django • open the terminal and navigate a folder in your system where you want to create a project. • Django-admin startproject djangoProject
  • 13. • this command will create a project named "djangoProject" in your folder. • and here is your first django project.
  • 14. Project • creating Home page using django framework. • open the terminal and navigate a folder in your system where you want to create a project. • django-admin startproject HomeProject
  • 15. • cd HomeProject • Create app of our project – python manage.py startapp myapp – code . – it will open the project in coding app in your system.
  • 17. • create a folder named "Templates" in Application. • After creating Templates create a new file named "home.html".
  • 18. • After creating a file make their view in views.py.
  • 19. • create a url for http response.
  • 20. • Then run your project using this commands • Open new terminal – python manage.py runserver – follow the link.
  • 21. And here is your project
  • 23. • Creating navbar of webapp
  • 24. • Code for navbar
  • 25. • Adding data in web app using django models – Create a model in floder named “models.py”
  • 26. • Model Migrations – Open new terminal and execute the following commands – Python manage.py makemigrations
  • 27. • - python manage.py migrate
  • 28. Model Registration • Open a folder named “admin.py” in application – Import the created Model in admin.py.
  • 30. • Import the model in views.py
  • 31. • Adding content using cards
  • 32. • Defined code for image & card
  • 33. Cards
  • 35. • Footer for webapp
  • 36. • Creating footer for project
  • 37. Admin-panel in Django • Creating admin panel of webapp – Open new terminal and follow the given commands – Python manage.py createsuperuser
  • 39. • Added data in panel
  • 40. • Adding dynamic data to web using MVT architecture.
  • 42. • Create html file in folder named “Templates” in application – And follow the code
  • 43. • Creating a view for template – Click to python file named views.py – And create the view for template
  • 44. • Getting URL for specific created http response(view) – Click to python file named Urls.py – Add views from application – And give a path
  • 45. Static • Adding Static files in web app – Click to settings.py and follow the defined code
  • 46. • Then move to urls.py and follow the steps for static image
  • 47. Thank you 304 Aditya Arcade, Nr. Choice Restaurant CG Road Ahmedabad Contact 9537344018 www.codingcloudinstitute.com