Django Tutorials for Beginners

Before we learn Django, let's understand:

What is a Web Framework?

A web framework is a code library which helps you to build a flexible, scalable, and maintainable; dynamic website, web app, and web services. Different web frameworks are Zend for PHP, Ruby on Rails for Ruby, etc.

What is Django?

Django is a web development framework for Python which offers a standard method for fast and effective website development. It helps you to assists in building and maintaining quality web applications. It enables you to make the development process smooth and time-saving.

It is a high-level web framework which allows performing rapid development. The primary goal of this web framework is to create complex database-driven websites.

In this tutorial, you will learn

Why Django? Key Advantages

Here, are prime reasons for using Django:

History of Django

Features of Django

Characteristics of Django

Django Architecture: MVC and MVT

MVC Pattern:

When talking about applications which provide UI (web or desktop), we usually talk about MVC architecture. MVC pattern is based on Model, View, and Controller.

The Model defines the data structure and takes to care for querying the database.

The View defines what data should be presented and returns an HTTP response.

The Controller is that part of the application that handles the user interaction.

Django MVC-MVT pattern

The Model-View-Template (MVT) is a different concept compared to MVC. The main difference between these two architectural patterns is that Django itself manages the Controller part (software code that controls the interactions between the Model and View). The template is an HTML file which mixed with Django Template Language file which also called DTL.

The below-given diagram shows how all the components of the MVT pattern interact with each other to serve specific to a user request.

MVT Architecture

As seen in above diagram, a user requests for a resource to Django. Django acts as a controller and checks to the available resource in URL.

If URL maps, a view is called which interacts with model and template. Django then responds to the user and sends a template as a response.

Components of Django

Form:

Django has a powerful form library which handles rendering forms as HTML. The library helps in validating submitted data and converting it to Python types.

Authentication:

It handles user accounts, groups, cookie-based user sessions, etc.

Admin:

It reads metadata in your models to provide a robust interface which can be used to manage content on your site.

Internationalization:

Django provides support for translating text into various languages, locale-specific formatting of dates, times, numbers, and timezones.

Security:

Django provides safeguard against the following attacks:

Famous Companies Using Django

Here, are companies which are using Django:

Disadvantages of using Django

Summary

 

YOU MIGHT LIKE: