Python

Django

Django is the most popular web framework for Python.

Why Django?

Django organizes your website into apps.

It has an template engine, database support, an ORM, automatic admin interface, URL routing and way more.

Python and Django Full Stack Web Developer Bootcamp

Apps

Every app is a component of a website, these apps can be reused in other websites. An app can be anything from a poll, blog to a forum.

In the long run that will save you a lot of development time.
It’s also easy to add apps from other projects. Apps are pluggable.

Each app has its own views and models.

Inside the project directory, each app has its own directory.

Note: In the models, an object relational mapper (ORM) can be used. An ORM maps Python objects to the MySQL database, meaning you don’t have to write SQL queries.

Template engine

Django has a template language out of the box. Inside HTML, tags can be used.
If you want to print a variable:

{{ post.title }}

You can loop through a list in a template:

{% for post in forum.posts.all %}
...
{% endfor %}

Even if statements can be used in a template:

{% if admin %}
...
{% else %}
...
{% endif %}

You may like:

Admin Interface

Django comes with an admin interface!

It’s tedious work to create admin sites for clients to edit database data.
Django automates creation of admin interfaces for models.

django admin interface

Forms

Even forms come with Django. Automatic input validation, generate forms, convert data to python datatypes

Previous Post Next Post

Cookie policy | Privacy policy | ©

Django