Django Tutorial

Django is a high-level Python web framework built around one core promise: take care of the tedious, repetitive parts of building a web application — routing, database access, an admin interface, form handling, security — so you can focus on what makes your app actually different. This is the most complete track on this site: 56 lessons covering everything from your first project through models, forms, real user authentication, a full admin panel, REST APIs, testing, and deployment. Throughout the whole track we build one running example together — TaskFlow, a small task-management app with projects, tasks, and tags — so every concept is shown in a real, connected context rather than isolated snippets.

Where this fits: This track assumes you've been through Core Python (variables, functions, classes, OOP) — if any of that feels shaky, the Core Python track is a good foundation first.

What Makes Django Different

Compared to...Django's approach
Flask / FastAPIDjango is "batteries included" — an ORM, an admin panel, a forms library, and an authentication system all ship built in, rather than you assembling pieces yourself
A framework with no ORMDjango's ORM lets you work with your database using Python classes and methods instead of writing raw SQL for most operations
Writing an admin panel from scratchDjango can generate a full, working admin interface for your data automatically, just by registering your models

A Quick Look Ahead

Example: A Model and a View Working Together

# taskflow/models.py
class Task(models.Model):
    title = models.CharField(max_length=200)
    completed = models.BooleanField(default=False)
    due_date = models.DateField(null=True, blank=True)

# taskflow/views.py
def task_list(request):
    tasks = Task.objects.filter(completed=False)
    return render(request, 'taskflow/task_list.html', {'tasks': tasks})
Note: This is correct, real Django code — but this website's own project doesn't run a Django server, so you won't see it actually execute on this page. Follow along by creating your own project after the next few setup pages.

What You'll Learn In This Track

AreaCovered in
FoundationsInstallation, your first project, project structure, your first app
The MVT patternURL routing, function & class-based views, templates, static & media files
The data layerModels, migrations, QuerySets, relationships, aggregation, the shell
Forms & usersDjango Forms, ModelForms, authentication, permissions, security
The adminRegistering models, customizing list views, actions, and inlines
ArchitectureMiddleware, signals, email, sitemaps, i18n, logging
Building APIsDjango REST Framework — serializers, views, auth, pagination
Shipping itTesting, caching, background tasks, environment config, deployment
Next steps: Head to Why Django? before we install anything — understanding the philosophy makes everything after it click faster.