DJANGO FOR EVERYONE. Complete Django Bootcamp - Tutorial[1]


Basics of Django - Tutorial Series [1].

Posted by Shah Stavan on OCTOBER 09 , 2021

What is Django? Top reasons you should learn Django if you are Web Developer. 

by SHAH STAVANOCT 09, 2021

Django is Python Web-Framework used to create any kind of websites such as Blogging Website, Social Networking sites, etc. Primarily, Django is used for creating Web Applications and work as Backend Framework. Like Php you can embed code Django code in HTML or vice versa. Django is Free and Open Source.

Django faces tough competition with Flask though Flask is based on Python Language. But now Django is becoming more popular and developers are showing keen interest in Django. And there is a constant growth in Django Community.



Why Django?

Django is a Python Web Framework which works on method called MVT ["Model View Template"] and simply means every page has it's own functionality and you know very precisely where every stuff should be there. In short, Django works in a semantic manner or consistent manner. 

AdvanTages of django framework

  • More Secure - Django manages your accounts and passwords in most secure way. And avoids mistakes of putting Session information in Cookies where it is vulnerable and directly storing password rather than using Password Hash.
  • Versatile - Using Django we can develop any kind of Web Applications.
  • Maintainable - Django works on principle "DRY - DON'T REPEAT YOURSELP". In simple terms to avoid duplication or all web pages must have their unique features and functionalities.
  • Inheritance - Best feature which Django provides is Inheritance. Let's assume you want to apply Navbar in all pages except Login and Register Page. Create different page for Navbar and inherit in other pages simply using keyword "
    {% include 'navbar.html' %}". 
  • Portable - Django can run on multiple Platforms. That means that you are not tied to any particular server platform, and can run your applications on many flavours of Linux, Windows, and Mac OS X.
  • Scalable - Example: You own a website and you see sudden increase in Traffic on your Website. Django will scale your servers automatically.

What is Web-Framework? It means there are few sets of Patterns or Standard. For developing website it will provide Standard Template to develop website with help of tools

How Django Works?

When user makes HTTP Request what happens is Django Controller will go to URLS.PY where all sets of URL Patterns are available.
Further it will search for appropriate request in VIEWS.PY where all sets of Templates[In other terms Web Pages] will be available and if it's valid request it will give you HTTP Response in HTML format.

MODELS.PY -  All User credentials such as accounts and Passwords will be managed here. Simply, it stores and maintain the data.

Django Working

WHAT IS MVT?

MODEL VIEW TEMPLATE 
If we look at the 3-tier architecture of an app. Views are like the business logic layer. It is the controller in a typical MVC (Model View Controller) design but Django has a slightly different naming convention called MVT (Model View Template) where:
Model is the data access layer,
View is the business logic layer and
Template is the presentation layer.

Hope you have enjoyed the Article😉.
In next Tutorial Series we will learn about Django Installation and Virtual Environment.

Catch You later Toddles ✌️