Introduction Django web framework

04-02-24 Ahmed Obaid 2884 0

In our first Django article, we will answer the question “What is Django ?” We provide an overview of what makes the Django web framework special.

What is Django?

Django - also pronounced "Django", and named after the famous jazz musician Django Reinhardt. First publicly released in 2005, Django is a web framework based on the Python programming language. Using the Django web framework, web developers can focus on creating a unique application. Benefit from greater flexibility from using a web development tool. A free and open source web framework, with a thriving and active community, great documentation,

A brief history of the Django web framework?

Django was initially developed between 2003 and 2005 by a web team that was responsible for creating and maintaining newspaper websites. After creating a number of sites, the team began taking a lot of common code and design patterns into account and reusing them. This popular code evolved into a generic web development framework, which was open sourced as the "Django" project in July 2005.

Django has continued to grow and improve, from its first release (1.0) in September 2008 to version 4.0undefined in 2022. Each release has added new functionality and bug fixes, from supporting new types of databases, template engines, and caching, to adding "generic" view functions and classes (which reduces the amount of code developers have to write for a number of programming tasks).

 Philosophy of the Django web framework


  •  A Django project consists of a set of simple, reusable, and configurable applications, not one huge, complex application. Each application should serve a single purpose. For example, an application that: handles user registration, email confirmation, profile editing and profile viewing can be split into two separate applications: user registration and profile management, so it is possible to use the application in other projects.

  •  Django applications use as little code as possible; Django takes full advantage of Python's dynamic capabilities.

  •  Create dynamic pages with templates , Because Django is designed for use in web application development, it easily generates dynamic HTML using a built-in template engine called the Django Template Language undefined (DTL).

  •  Offers special features to enhance security. It is designed to automatically protect the website. For example, Django provides a secure way to manage user accounts and passwords, avoiding common mistakes like putting session information in cookies where it is vulnerable (instead cookies only contain a key, and the actual data is stored in the database) or Store passwords directly instead of password hashes.

The most important features of the Django web framework are the following:


  • A lightweight, standalone web server for development and testing

  •  A form serialization and validation system that can translate between HTML forms and appropriate values ​​for storage in a database

  •  A template system that uses the concept of inheritance borrowed from object-oriented programming

  •  A caching framework that can use any of several caching methods

  •  Support for middleware classes that can intervene in different stages of request processing and implement custom functions

  •  An internal dispatcher system that allows application components to communicate events to each other via pre-defined signals

  •  Internationalization system, including translation of Django's own components into a variety of undefined Languages

  •  A serialization system that can produce and read XML and/or JSON representations of Django model instances

  •  A system to expand the capabilities of the template engine

  •  An interface to Python's built-in unit testing framework

 The primary goal of Django is to make it easier to create complex, database-driven websites. Working on reusability and "plugability" of components, less code, low coupling, rapid development, and the principle of non-repetition. undefined



Tags


Django introduction

Share page