Current Page: 2
Features of Django
* Helps you to define patterns for the URLs in your application
* Simple but powerful URL system
* Built-in authentication system
* Object-oriented programming language database which offers best in class data storage and retrieval
* Automatic admin interface feature allows the functionality of adding, editing and deleting items. You can customize the admin panel as per your need.
* Cache framework comes with multiple cache mechanisms.
Characteristics of Django
* Loosely Coupled − Django helps you to make each element of its stack independent of the others.
* Less code – Ensures effective development
* Not repeated- Everything should be developed in precisely one place instead of repeating it again
* Fast development- Django’s offers fast and reliable application development.
* Consistent design – Django maintains a clean design and makes it easy to follow the best web development practices.
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.
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.
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:
* Cross-Site Request Forgery (CSRF)
* Cross-site scripting
* SQL injection
* Clickjacking
* Remote code execution
Famous Companies Using Django
Here, are companies which are using Django:
* BitBucket
* DISQUS
* NASA
* PBS (Public Broadcasting Service)
* Pinterest
* Instagram
* Mozilla
* The Washington Post
* NY Times
* LA Times
* The Guardian National Geographic
* Discovery Channel
Disadvantages of using Django
* A process cannot handle multiple requests simultaneously.
* Django is a very much monolithic tool.
* Components get deployed together which can create confusion.• Knowledge of full system needed to work on Django
* Makes web application components tightly-coupled
* You need to do lengthy programming for minor tasks.