Tutorials¶
Phase 1, on weekends from 24 October to 22 November (reset on 23 October: I can only really work on weekends). The plan was to do these before touching a ticket; #2904 came first. I tick each box when the code runs on my machine, and reading alone does not count.
The Django tutorial¶
The polls app, in eight parts. Links go to the stable documentation.
- Part 1 (weekend of 24–25 Oct): a project, an app, a first view. Requests and responses.
- Part 2 (weekend of 24–25 Oct): the database, models, a first migration, the admin site.
- Part 3 (weekend of 31 Oct–1 Nov): views and templates.
- Part 4 (weekend of 7–8 Nov): forms and generic views.
- Part 5 (weekend of 7–8 Nov): automated tests.
- Part 6 (weekend of 14–15 Nov): static files.
- Part 7 (weekend of 14–15 Nov): customising the admin site.
- Part 8 (weekend of 14–15 Nov): third-party packages.
Code: lindangulopez/djangotutorial.
Part 2 and part 5 matter most for what follows: part 2 is where migrations first appear, and part 5 is how Django expects a change to be proven.
ORM topic guides¶
Weekend of 21–22 November, once the polls app works. Database transactions if there is time.
- Models: fields, relationships,
Meta. Demo: Models demo. - Making queries:
QuerySet, lookups, related objects. - Migrations:
makemigrations,migrate,sqlmigrate,showmigrations, thedjango_migrationstable. - Database transactions:
BEGIN,COMMIT,transaction.atomic.
Output of the week: a short note, in my own words, on what migrate does between BEGIN and COMMIT.
Contributing tutorial¶
- Writing your first contribution for Django: done before the session, with a practice patch.
Where the code lives¶
The polls project goes in my fork of django-local-test, so that the same project can later run against a local copy of Django. See Setup.
If the tutorials take longer than four weekends, they keep the priority and the contribution gets smaller. See Learning path.