This example is an end-to-end Django app wired to hyperdjango.
Action responses in the example now use the typed item style (HTML, Toast, Delete, Event, etc.), which HyperDjango streams to the browser as SSE-framed events. Alpine-only signal items live under hyperdjango.integrations.alpine.actions.
- file routing (
index, static, dynamic, catch-all, route groups) - nested layouts (
/dashboard,/dashboard/settings) - action-driven partial updates (
/,/todos,/search) - multi-target HTML updates and toasts (
/todos) - sync lanes and request lifecycle behavior (
/search) - Django form enhancement via
$action(..., data, { form })(/profile)
/->hyper/routes/index/+page.py/about->hyper/routes/about/+page.py/blog/<slug>->hyper/routes/blog/[slug]/+page.py/docs/<path:path>->hyper/routes/docs/[...path]/+page.py/account/reset/<uidb36>-<key>->hyper/routes/account/reset/[uidb36]-[key]/+page.py/regex/<kind>-v<version>->hyper/routes/regex/[kind]-v[version]/+page.py/typed/<str:slug>->hyper/routes/typed/[str__slug]/+page.py/regex-inline/<uidb36>-<key>->hyper/routes/regex-inline/[uidb36__[0-9A-Za-z]+]-[key__.+]/+page.py/pricing->hyper/routes/(marketing)/pricing/+page.py/dashboard->hyper/routes/dashboard/index/+page.py/dashboard/settings->hyper/routes/dashboard/settings/+page.py/modal-demo->hyper/routes/modal-demo/+page.py/upload-progress->hyper/routes/upload-progress/+page.py/sse-demo->hyper/routes/sse-demo/+page.py/error-demo->hyper/routes/error-demo/+page.py/search->hyper/routes/search/+page.py/todos->hyper/routes/todos/+page.py/signals->hyper/routes/signals/+page.py/profile->hyper/routes/profile/+page.py/template-card-> custom URL +hyper/templates/profile_card/page.py/plain-django-view->hyper/routes/plain-django-view/+page.py(django.views.View)
/modal-demo demonstrates HyperPageTemplate.render_template(...) rendering a directory-relative partial package with its own entry.ts, then returning it as typed HTML + LoadJS items.
/upload-progress demonstrates upload progress tracking with both Alpine $action(...) + hyper:uploadProgress and plain window.action(...) + onUploadProgress.
/sse-demo demonstrates a long-running action yielding incremental typed items, streamed to the browser as live SSE-framed updates.
/error-demo demonstrates listening for hyper:requestError to show a toast and render a UI error state after an action raises PermissionDenied.
Most example actions now return typed items (Signal, HTML, Toast, LoadJS, etc.), which HyperDjango streams to the browser as SSE-framed action events.
From repository root:
python -m venv .venv
source .venv/bin/activate
pip install -e .Then run Vite and Django in separate terminals.
Terminal 1:
cd example
npm install
npm run devTerminal 2:
cd example
python manage.py migrate
python manage.py runserverOpen http://127.0.0.1:8000/.
python manage.py hyper_routeslists all routes above./increment action updates without full reload./searchcancels/replaces in-flight requests on repeated queries./todossupports add/toggle/delete with partial swaps + multi-target HTML updates./signalsdemonstratescount(local) vs$count(global store) patching./profilereturns server-rendered validation errors and success partials./upload-progressshows progress updates for file uploads in both callback and event-driven styles./sse-demoshows a long-running streamed action updating progress and appending live server log entries./error-demoshows how to catchhyper:requestErrorand convert server error statuses into client toasts./template-cardrenders aHyperPageTemplatefrom a custom Django view (no file route)./plain-django-viewdemonstrates file route resolution with plaindjango.views.View./account/reset/abc123-token456resolves bothuidb36andkeyfrom one segment./regex/release-v42demonstrates literal + params composite regex matching./typed/hello-worlddemonstrates typed dynamic token syntax./regex-inline/A1b2c3-reset-token-xyzdemonstrates inline regex token syntax.