THE LEARNING PATH
Full chapter index
Browse all 75 chapters under their existing stages, or choose a volume from the library shelf.
Click to browse all chaptersClose chapter list
THE LEARNING PATH
Contents
Chapters are grouped into ten stages. Pre-release chapters are complete enough to read but still under review; planned chapters are not yet written. A milestone tag marks the chapter where something new first works; Chapters 67–74 are optional. See Book structure for every milestone.
Your reading progress is saved in this browser only.
- Chapters 1–8 Requirements and first project
- CHAPTER 01AvailableOtahque: the problem and the peopleMeet Sam, Sai, Raj, and Soni, and the registration problem that Otahque solves.Read chapter →
- CHAPTER 02Pre-releaseBusiness requirements, product scope, and user storiesTurn needs into scope, user stories, acceptance criteria, product rules, and a traceability register.Read pre-release →
- CHAPTER 03Pre-releaseHow the web worksFollow web addresses, requests, browser and server responsibilities, and a complete Otahque registration journey.Read pre-release →
- CHAPTER 04Pre-releasePython readiness and development toolsCheck Python fundamentals, read errors, and use uv to run practice files in an isolated environment.Read pre-release →
- CHAPTER 05Pre-releaseDjango’s role and our first architecture decisionMilestone: Plan readyUnderstand Django’s role, follow a request through its components, sketch the design, and record a first architecture decision.Read pre-release →
- CHAPTER 06Pre-releaseCreating the project and understanding its filesMilestone: First Django pageCreate and explain a Django project, open its local development page, and diagnose setup failures.Read pre-release →
- CHAPTER 07Pre-releaseDjango apps and application boundariesSee what Django apps are, choose Otahque’s first app boundary, and create, install, and check the events app.Read pre-release →
- CHAPTER 08Pre-releaseSettings, environments, dependencies, and GitSeparate configuration from code, lock the project’s dependencies with uv, and start its history with Git.Read pre-release →
- Chapters 9–14 Pages and design
- CHAPTER 09Pre-releaseURLs and routingMilestone: First Otahque pageFollow a URL to a view and build the first Otahque pages.Read pre-release →
- CHAPTER 10Pre-releaseFunction-based views and request/response objectsFollow a request into a view and show a fictional event detail.Read pre-release →
- CHAPTER 11Pre-releaseTemplates, context, and escapingRender fictional event pages with templates and escaped context.Read pre-release →
- CHAPTER 12Pre-releaseTemplate inheritance, includes, and partialsShare one layout and navigation across pages, reuse an event row, and label samples safely.Read pre-release →
- CHAPTER 13Pre-releaseStatic files and CSS fundamentalsAdd a shared stylesheet through static files, and learn selectors, boxes, and the cascade.Read pre-release →
- CHAPTER 14Pre-releaseTailwind, daisyUI, and Otahque’s design systemMilestone: Browsable event pagesBuild the stylesheet with Tailwind and daisyUI, and give the sample pages a small, measured Otahque theme.Read pre-release →
- Chapters 15–23 Data and the database
- CHAPTER 15Pre-releaseRelational databases and our first ERDDesign Otahque's first data model: tables, keys, relationships, and an entity-relationship diagram, before any Django model.Read pre-release →
- CHAPTER 16Pre-releaseDjango models and field choicesTurn the proposed Event entity into a Django model: field types and options, a fixed list of statuses, and tests that need no database.Read pre-release →
- CHAPTER 17Pre-releaseChoosing and creating our user modelChoose Otahque's user model before the first migration: a custom user that signs in by email, its manager, password storage, and a decision record.Read pre-release →
- CHAPTER 18Pre-releaseMigrations and schema evolutionCreate Otahque's first migrations and tables, test saving users against a real database, create a local superuser, and change a table that holds rows in reversible steps.Read pre-release →
- CHAPTER 19Pre-releaseORM fundamentalsSave, find, change, and delete events with Django's ORM in the shell, then make the event pages read published events from the database, with tests that hide drafts and count queries.Read pre-release →
- CHAPTER 20Pre-releaseRelationships between modelsConnect models with foreign keys: a new registrations app, Registration and OrganizerAssignment models whose PROTECT rule keeps history, reverse access with related_name, filters across relationships, and one query instead of one per row.Read pre-release →
- CHAPTER 21Pre-releaseValidation, constraints, and data integrityMake the database keep Otahque’s rules: validation with full_clean(), CheckConstraint and conditional UniqueConstraint rules for registrations, organizer assignments, and events, a time-zone validator, and email addresses stored in lower case.Read pre-release →
- CHAPTER 22Pre-releaseQuerySets, managers, and query compositionGive query rules one home: a custom QuerySet with published() that both public views use, upcoming() and past() that put past events last and faded, active() for registrations, Q and F expressions, ordering, counting with annotate() and aggregate(), and related rows with Prefetch.Read pre-release →
- CHAPTER 23Pre-releaseDjango admin fundamentalsConfigure Django's admin site as the community administrator's tool: an address read from settings, an event list with each start in UTC and in the event's own zone and the places left, registrations as read-only history, organizer assignments granted and revoked, a user page with no password, a read-only audit log, and tests for every limit.Read pre-release →
- Chapters 24–34 Accounts and first release
- CHAPTER 24Pre-releaseDjango formsBuild Otahque's first form: Sam's New event page, a ModelForm with an explicit list of fields that reads times in the event's own zone and refuses clock-change times, saves only drafts with Sam as organizer, shows each draft only to its organizers and the administrator, renders accessible daisyUI fields, and proves the CSRF protection with a test.Read pre-release →
- CHAPTER 25Pre-releaseEditing an event, and the validation lifecycleGive Sam an Edit event page: the same ModelForm with an instance, the validation lifecycle in order, edits limited to an event's current organizers, saved times shown in the event's own zone and kept when untouched, a change of zone confirmed with both readings, capacity refused beside its field and never below the places taken, and tests that crafted fields change nothing.Read pre-release →
- CHAPTER 26Pre-releasePublishing, cancelling, and deleting an eventTake Sam's clinic public: a description field and its migration (read with sqlmigrate, rolled back and applied again), the model's own address, a My events page, a Publish button that refuses an unfinished draft and names what is missing, Cancel and Delete behind POST forms for the right states and people, a copy of last week's event, and a written design of the event's states.Read pre-release →
- CHAPTER 27Pre-releaseAuthentication and account workflowsGive members their own accounts with django-allauth around Otahque's email-only user: sign-up that asks a display name and an optional time zone and refuses invalid and disposable addresses, sign-in by email, sign-out by POST, a profile page that can only change your own details, Google and GitHub sign-in that never links accounts by email alone, and organizers' names on event pages.Read pre-release →
- CHAPTER 28Pre-releaseSessions, cookies, and time zonesMake Otahque remember each visitor: what cookies and sessions hold, messages that survive a redirect and can be closed, an event-list filter kept in the session, the browser's time zone in a checked cookie, middleware that shows every page in the viewer's zone while the admin stays in UTC, the venue's time and yours on event pages, event forms that read typed times in the event's zone, and signed values that can be read but not changed.Read pre-release →
- CHAPTER 29Pre-releaseAccount security: passwords, sign-in codes, and two factorsMake members' accounts harder to take: password rules from NIST SP 800-63B-4, password change, reset, and set pages that reveal nothing about who has an account, reset links that work once and for one hour, Otahque's own words in every account email with a notice for each change, sign-in by a code sent by email, two-factor sign-in with an authenticator app and recovery codes, and the admin's sign-in sent through the same pages.Read pre-release →
- CHAPTER 30Pre-releasePermissions, ownership, and rolesDecide who may do what, and prove it: a permission matrix with a test for every row, Organizers and Administrators groups created by a migration, one rule for adding and removing organizers shared by the admin and an Organizer access page that only administrators open and that asks for the password again, an admin that cannot be used to promote anyone, IDOR named and refused, and an audit trail of each event action, each change of organizer access, and each refused attempt.Read pre-release →
- CHAPTER 31Pre-releaseEvent registration and cancellationLet members take and give back places: registration times required before publishing, rules as named reasons tested at the exact instant, register() in a transaction with the database rule as its backstop, repeated requests that change nothing, cancellation until the start with late ones marked, a phone number asked for once, My registrations, and an attendee list with contact details that only the event's organizers and the administrator can open.Read pre-release →
- CHAPTER 32Pre-releaseMoving to PostgreSQLMove Otahque from SQLite to PostgreSQL 18 without losing a row: install the server, a role and a database with one sort order everywhere, settings read from .env, the data written out in XML and loaded with natural keys, a comparison script that checks every table, the test suite on PostgreSQL, a backup restored and compared, ADR-005, and wider two-column forms.Read pre-release →
- CHAPTER 33Pre-releaseTransactions, concurrency, and the last available seatGive the last place to exactly one member: what a transaction does and does not promise, a test that makes the race happen every time, a row lock with select_for_update() and checks on the locked row, a time limit with a clear "busy" answer, a version that refuses stale edits on the edit page and in the admin, and clearer full and closed states.Read pre-release →
- CHAPTER 34Pre-releaseTesting fundamentals and first-release acceptanceMilestone: First releaseTurn "the tests pass" into evidence for the first release: which test tool answers which question, tests moved into packages with shared helpers, coverage measured under --parallel and read for untested behaviour, a test that depended on the order fixed, an acceptance trace that links Chapter 2's rules to named tests and checks itself, the checks run in GitHub Actions on PostgreSQL, a skip link and clearer messages, and the v0.1.0 tag.Read pre-release →
- Chapters 35–46 Growing the application
- CHAPTER 35Pre-releaseClass-based views and dispatchRewrite two pages as class-based views and prove what changed: tables of tests that pin each page's answer to every HTTP method, written first; a hand-made as_view() compared with Django's View; the event page as a class with its new answers declared; the details page as a class with its decorators kept in order; the event page's facts as a labelled list beside a registration card; and ADR-006, which says where each of Otahque's 19 views goes.Read pre-release →
- CHAPTER 36Pre-releaseGeneric display views and paginationTurn the event page into a DetailView and three lists into ListViews: method tables pinned first, Django's Paginator tried by hand, one ordered event list with past events faded, checkbox filters kept in the address and remembered in the session, My events and My registrations showing only your own records, accessible page links built with querystring, and event cards in a responsive grid.Read pre-release →
- CHAPTER 37Pre-releaseGeneric editing views and access mixinsTurn the six pages that change data into generic editing views: method tables pinned first, Python's method resolution order tried by hand, ManageEventMixin keeping the access rule in Event methods with recorded refusals, a comparison with UserPassesTestMixin and the leak a misplaced mixin causes, the edit page keeping its lock, delete pages closed to the DELETE verb, and an edit form in labelled groups with a marked danger area.Read pre-release →
- CHAPTER 38Pre-releaseAdvanced admin and formsetsLet each event ask its own questions: company, college, and website on the profile; up to ten questions of eight kinds built with an inline formset on the edit page and saved under the event's lock; a registration form built at run time; answers kept with the place, shown on the attendee list, and changeable until the start; questions archived, never deleted; and admin filters, a date hierarchy, member search, and read-only questions.Read pre-release →
- CHAPTER 39Pre-releaseMiddleware and context processorsGive every request an id, in its response header, its log lines, and on the page as a reference members can quote; make sign-in the default with LoginRequiredMiddleware, three pages marked public and a test that lists them, and the sign-in checks it makes redundant removed; a context processor with no queries; and styled 403, 404, and 500 pages and a footer that show the reference.Read pre-release →
- CHAPTER 40Pre-releaseSignals, application lifecycle, and system checksSee what Django does before the first request; build the post_save profile receiver many tutorials suggest, watch it break loaddata and code that creates profiles, and remove it; prove a member has at most one profile; add three Otahque system checks with ids and hints, two of them deploy checks; and a "Finish your profile" card.Read pre-release →
- CHAPTER 41Pre-releaseManagement commands and data import/exportWrite three management commands: ensure_groups, which repairs the two groups from one shared list; seed_demo, the same sample community for every reader; and import_registrations, with a dry run that is the real import rolled back. Round-trip a fixture with natural keys, mark where each place came from, and stream the attendee table as a recorded, formula-safe CSV that Excel opens correctly.Read pre-release →
- CHAPTER 42Pre-releaseFile uploads and storageAccept pictures safely: Pillow, pinned; a size and pixel check before any pixel is decoded; a re-encoded copy without metadata; random names in STORAGES; one view that serves every file to exactly those who may see it; old files deleted after commit and a cleanup command; event covers, an organizer gallery with described photos, and member photos beside organizer names.Read pre-release →
- CHAPTER 43Pre-releaseEmail delivery and templatesEmail members: Mailpit, pinned, as a local inbox; Django 6.1 mailers chosen in .env, with SITE_URL and a deploy check; one text-and-HTML template for five messages, each sent after commit to one member; a failure that keeps the place and logs no address; organizers' announcements with a daily limit, a public-or-private choice, and an opt-out.Read pre-release →
- CHAPTER 44Pre-releaseBackground tasks, scheduling, and retriesMove email out of the request: Django's task interface with django-tasks-db, pinned, and its worker; a Delivery row per email, written with the change and sent once by a task after commit; three retries; an outbox that recovers lost enqueues; reminders organizers choose; a command scheduled on Windows, macOS, and Linux; and delivery counts.Read pre-release →
- CHAPTER 45Pre-releaseHTMX and progressive enhancementProgressive enhancement with htmx 2.0.11, served by Otahque with its checksum recorded, and django-htmx: event-list filters and page links that swap only the results, Register and Cancel that change the panel and the places count in place, a dialog to confirm a cancel, an Add question button, sign-in that works for htmx, and every page still working without JavaScript.Read pre-release →
- CHAPTER 46Pre-releaseWaitlists, check-in, and registration state transitionsMilestone: Event-day operationsA waitlist for full events, with each member's turn; automatic promotion of the first member waiting, under the event's lock, when a place is cancelled or the capacity rises; waitlists that close with registration; a QR check-in code for every place; a check-in window each organizer chooses; a door page and a scan page that check a member in once; attendance on the attendee list; and the Milestone 3 acceptance trace.Read pre-release →
- Chapters 47–54 APIs and real-time updates
- CHAPTER 47Pre-releaseAPI design and HTTP contractsA written contract for Otahque's first API, and its OpenAPI 3.1 copy; the event list and one event as hand-written JSON views; errors as problem details; ETags and 304 Not Modified; browser access for partner sites limited to the public reads; and a page for developers.Read pre-release →
- CHAPTER 48Pre-releaseDRF serializers and validationDjango REST framework with strict defaults; the public reads rebuilt with serializers against unchanged tests; one edit path shared by the edit page and the API; the organizer's own events, created and changed with If-Match; fields refused by name; times that must carry an offset; a dry run; and the edit page's errors listed at the top.Read pre-release →
- CHAPTER 49Pre-releaseAPI views, generic views, viewsets, and routersOne resource written three ways and compared; the organizer's events as one viewset with only the contract's actions, routed by SimpleRouter; publish, cancel, and deleting a draft through the site's own methods; the OpenAPI file made from the code, with a drift test; the browsable API in development only; and each event's API address on My events.Read pre-release →
- CHAPTER 50Pre-releaseAPI authentication and permissionsPersonal access tokens for scripts and AI agents: made once on an API tokens page behind the password, stored as a hash, sent as Authorization: Bearer, limited by scopes, expiring, and revocable; 401 for missing or bad credentials; tokens refused in addresses; every change named in the audit trail; and Sam's first script.Read pre-release →
- CHAPTER 51Pre-releaseFiltering, pagination, throttling, and API documentationBoth lists paged by cursor, twenty at a time; four filters on the public list, with a clear error for an unencoded plus sign; limits per visitor, member, and token, answered with 429 and Retry-After; a documentation page while developing; an httpx client that follows pages and retries only reads; and copyable examples on the developers page.Read pre-release →
- CHAPTER 52Pre-releaseWebhooks and reliable external integrationsWebhooks that tell partners when an event is published, changed, or cancelled: endpoints managed by administrators, messages signed as Standard Webhooks describes, queued with the change and sent after commit, retried for about 17 hours, and sent only to public addresses; admin edits through Event.edit(); and a partner's receiver that refuses forged and replayed messages.Read pre-release →
- CHAPTER 53Pre-releaseAsync Django, ASGI, and sync/async boundariesOtahque on ASGI: Django 6.1.3, Daphne's runserver, and uvicorn once; where sync and async meet in Django; middleware that runs without a thread; an async Send test button for webhooks; an attendee download that streams under ASGI; and a measurement of what async changed, with no speed claim.Read pre-release →
- CHAPTER 54Pre-releaseChannels and real-time updatesMilestone: API and integrationsLive updates with Django Channels: places left for everyone, a banner for members holding a place, and the door's count for organizers, sent after commit to only those allowed and checked again when access changes; polling every 30 seconds when a WebSocket cannot connect; and the trace that closes the fourth milestone.Read pre-release →
- Chapters 55–66 Performance, security, and deployment
- CHAPTER 55PlannedAdvanced ORM and database expressions
- CHAPTER 56PlannedSearch, indexes, and query plans
- CHAPTER 57PlannedCaching and application performance
- CHAPTER 58PlannedAdvanced testing and failure scenarios
- CHAPTER 59PlannedSecurity review, threat modelling, and hardening
- CHAPTER 60PlannedPreventing web and API attacks
- CHAPTER 61PlannedAccessibility, localization, timezones, and discoverability
- CHAPTER 62PlannedProduction architecture and Docker
- CHAPTER 63PlannedDeployment, static/media delivery, and HTTPS
- CHAPTER 64PlannedCI/CD, safe migrations, and rollback
- CHAPTER 65PlannedLogging, monitoring, backups, and recovery
- CHAPTER 66PlannedLoad testing, capacity planning, and scaling decisionsMilestone: Deployed application
- Chapters 67–72 Multi-community and extensions
- CHAPTER 67PlannedMulti-community requirements and tenancy alternativesOptional
- CHAPTER 68PlannedImplementing and testing tenant isolationOptional
- CHAPTER 69PlannedBilling, subscriptions, and entitlementsOptional
- CHAPTER 70PlannedVolunteer management and organizer planningOptional
- CHAPTER 71PlannedTeams, hackathon submissions, and judgingOptional
- CHAPTER 72PlannedJob board, reusable content, and moderationOptional
- Chapters 73–74 Optional AI features
- CHAPTER 73PlannedAdding an AI feature safelyOptional
- CHAPTER 74PlannedAI guardrails and adversarial testingMilestone: Optional extensions
- Chapter 75 Final review and maintenance
- CHAPTER 75PlannedFinal product review, UI refinement, upgrades, and maintenanceMilestone: Final review