What is Django?



Django is a Web infrastructure and set of components that helps you build websites faster and easier.
When building a website, always need a similar set of components away to manage user authentication, management panel for your website, forms to download files, and more.
A long time ago, other people noticed that web developers encountered similar problems when creating a new site. They have joined forces to create infrastructures (including Django) that allow you to use ready-to-use components.
Existing frameworks save you from having to reinvent the wheel and help you reduce overhead costs when building a new site.

Why do you need a Framework?

To understand what Django is for, we need to take a closer look at the servers. The first thing to do is that the server needs to know that you want it to serve you a web page.

Imagine a mailbox that is monitored for incoming letters (requests). This is done by a web server. The web server reads the letter and then sends an answer with a web page. But when you want to send something, you must have content. And Django helps you to create the content.

What happens when someone requests a website from your server?

When a request is sent to a web server, it is passed to Django, who tries to determine what is actually requested. First you need a web page address and try to find out what to do. This part is done by Django's urlresolver (note that a website address is called a URL - Uniform Resource Locator - so the urlresolver resource name has meaning). It's not very smart - you need a list of templates and try to match the URL. Django checks the patterns from top to bottom and if anything matches, Django transmits the request to the associated function.

Imagine a postman with a letter. She walks down the street and checks each house number against the one in the letter. If that fits, she puts the letter on it. Here's how the URL resolver works!

In the visualization function, all the interesting things are done: we can consult a database to search for information. Like a letter saying, "Please change the description of my work." The view can check if you are allowed to, then update the job description for you and return a message: "Done!" Then the view generates an answer and Django can send it to the user's web browser.

Visualpath: Python Django Training in Hyderabad, Django is a lightweight web developer framework, that is used to program applications which can run faster. Contact us@ +91 9989971070.


Comments