We are one of the most reputed Training institutes in Ahmedabad, Pune & Navi Mumbai. We are providing, Live Project Training in All Programming Languages C, PHP, Java, Android, Python, Data Science, Software Testing, & Graphic Designing. We are Providing Training classes in with Live Projects. We have a team of professional Trainers, mentors, and industry experts who Continuously struggling to survey the current market and preparing India s youth to contribute to the growth of our country. After Training, We provide 100% assured job assistant after the training. Our Goal is your Career is our Commitment. We Have Unlimited Combinations to create Bright Careers. Our Culture is No Theory, No Books
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.