How this Django track works
- Python in the playground — runnable code executes as plain Python 3 with
print(), dicts, lists, and classes that simulate ORM/queryset ideas. Click Run to execute. - Django framework in prose —
manage.py,settings.py, models, migrations, templates, and admin are taught with file trees and command examples. Install Django locally withpip install djangofor full MVT practice. - Prerequisites — finish Python (variables, functions, classes) and HTML (forms, semantic markup). Compare backend context with PHP and Node.js request–response lessons.
The runner does not ship Django itself—lessons simulate ORM patterns in Python so concepts stick before you run django-admin startproject on your machine.
Install on your device (macOS, Linux, Windows)
Install Python 3.11+ locally for notebooks and frameworks; the on-site playground uses the dev runner when enabled.
macOS
brew install python@3.12or install from python.org (check “Add to PATH” on installers).- Create a project folder:
mkdir ~/python-practice && cd ~/python-practice. python3 -m venv .venv && source .venv/bin/activatepip install --upgrade pip
Linux
- Debian/Ubuntu:
sudo apt update && sudo apt install -y python3 python3-pip python3-venv - Fedora:
sudo dnf install -y python3 python3-pip python3 -m venv .venv && source .venv/bin/activatepip install --upgrade pip
Windows
- Install from python.org and enable Add python.exe to PATH.
- Or:
winget install Python.Python.3.12 - PowerShell:
py -3 -m venv .venv; .\.venv\Scripts\Activate.ps1 pip install --upgrade pip
Verify: python3 --version (or py --version on Windows) shows 3.11+.
Run code on this site (Backend & language playgrounds)
- Clone or open this project locally; copy
.env.exampleto.env. - Ensure
LEARNING_RUNNER_ENABLED=trueandLEARNING_RUNNER_URL=http://127.0.0.1:9999/v1/execute. - Terminal 1:
php artisan serve(orcomposer run devfor Laravel + Vite + runner together). - Terminal 2:
npm run runner— keep it running while you click Run on server.
After Python is ready: pip install "django>=5.0" then django-admin startproject mysite.
Django is a high-level Python web framework for building secure, database-backed sites and APIs quickly. It ships batteries included: ORM, admin panel, forms, authentication, and templating—so you focus on your product instead of reinventing HTTP plumbing.
How this track differs from plain Python
After the Python track, you know variables, functions, classes, and modules. Django adds a project structure—settings, URLs, views, models, templates—and conventions that scale from hobby blogs to Instagram-scale deployments (with tuning).
Compare with PHP and Node.js: all three handle HTTP requests and talk to databases, but Django's ORM and admin are especially productive for CRUD-heavy apps.
What you will learn
- MVT architecture: models, views, templates, and URL routing
- Python refresher tailored to Django patterns
- Project layout:
manage.py,settings.py, apps, and static files - ORM models, migrations, querysets, admin, and forms
- Class-based views, validation, messages, auth basics, middleware, testing, and deployment habits
Playground setup
This topic uses the server_script profile: runnable code is plain Python 3 with print(). Lessons simulate ORM/queryset ideas with dicts and classes. Full Django (pip install django, runserver) runs on your local machine—file trees and commands in prose teach the real workflow.
Self-check
- In one sentence, what problem does Django solve for web developers?
- Why is Python a prerequisite before this track?
Interview prep
- What is Django in one sentence?
Django is a batteries-included Python web framework for building secure, database-backed sites and APIs with ORM, admin, forms, and auth built in.