Create your free BvLogic ID to continue this course and save your progress.
Django Basics 5 lessons
  1. 1 Python on the web, batteries included
  2. 2 Models, migrations and the ORM sign in to open
  3. 3 Views, URLs and templates sign in to open
  4. 4 Users, permissions and the admin sign in to open
  5. 5 Deploying and running it sign in to open
Course overview
Data: video · change

This lesson: 122KB

Django Basics · Lesson 1 of 5

Python on the web, batteries included

Know what Django gives you.

Django is a Python web framework that includes almost everything a web application needs, which is deliberate and is the main reason to choose it.

What comes with it. An ORM for the database. Migrations. A full admin interface generated from your models. Authentication with users, groups and permissions. Forms with validation. A template system. Security protections against the common attacks. And a testing framework.

The admin interface is the feature people underestimate. A working interface for managing your data, generated from your models, in minutes. For an internal tool, a content system or an early stage product, that alone can be most of the application, and building the equivalent by hand is weeks.

Where Django suits. Content sites, internal business applications, anything with a substantial admin need, data heavy applications, and anything where Python is already used, which for anybody doing data or machine learning work means the same language throughout.

Against Flask and FastAPI. Flask is minimal and you assemble what you need, which suits small services. FastAPI is excellent for APIs specifically and is faster for that purpose. Django is the right choice when you want a complete application with an admin and users rather than an API alone.

In Pakistan, Django appears in product companies, in agencies doing Python work, and in anything adjacent to data science. Fewer jobs than PHP and Laravel locally, and well represented in international remote work.

Lab — try it yourself

Create a Django project, define one model, and open the admin. The amount working within ten minutes is the argument for the framework.

Check what you learned

Create your free BvLogic ID to take the quiz and record your score.

Create your BvLogic ID
Continue to lesson 2 Up next 2. Models, migrations and the ORM