Django
Server-rendered web applications with templates, an ORM and forms, built step by step.
8 chapters, about 2 hours of study. Part of the free Learn Python course.
- Project and pages1. Django tutorial: install, create a project and your first appInstall Django, create a project and an app, learn settings, URLs and views, run migrations and the dev server, and follow one request.11 min study
- Project and pages2. Django URLs and views: converters, query strings, JSONRoute URLs to Django views with path converters, read query strings, return JSON and 404s, restrict HTTP methods, redirect with reverse, and set cookies.13 min study
- Project and pages3. Django templates: inheritance, includes, filters, staticRender HTML with Django templates: render() and context, base templates and blocks, includes, filters, auto-escaping, static CSS and TemplateView.12 min study
- Data4. Django models and migrations: fields, choices, adminDefine Django models with fields, choices and validators, create tables with migrations, learn null versus blank, add constraints and use the admin.12 min study
- Data5. Django QuerySets: filter, lookups, aggregates and transactionsQuery Django models with filter, lookups and Q objects, understand lazy QuerySets, aggregate and annotate, update with F and use atomic transactions.13 min study
- Data6. Django relationships: ForeignKey, ManyToMany, N+1 queriesLink Django models with ForeignKey, ManyToManyField and a through model, pick on_delete rules, query across relations and fix N+1 queries.11 min study
- Forms and editing7. Django forms: fields, validation, clean methods and CSRFBuild Django forms with typed fields, validate with clean methods, handle bound and unbound forms, render errors, use CSRF tokens and messages.13 min study
- Forms and editing8. Django CRUD with ModelForm and generic class-based viewsCreate, list, edit and delete Django models with ModelForm and generic views like ListView and CreateView, with permissions and messages.14 min study