Examples

Example App

Run the bundled project and explore its routes, actions, layouts, dynamic segments, and browser tests.

This page focuses on the practical details. Use the quick links below to move to the previous, next, or related docs.

The repository includes a complete example project under example/.

What it demonstrates:

  • file routing (index, static, dynamic, catch-all, route groups)
  • nested reusable layouts (/dashboard, /dashboard/settings)
  • action-driven swaps and multi-target HTML updates (/todos)
  • local and global signals (/signals)
  • composite segment matching (/account/reset/<uidb36>-<key>)
  • literal+param regex segment (/regex/<kind>-v<version>)
  • typed dynamic segment (/typed/<str:slug>)
  • inline regex token segment (/regex-inline/<uidb36>-<key>)
  • template package rendered by custom Django view (/template-card)
  • file-routed PageView subclassing plain django.views.View (/plain-django-view)
  • sync behavior for live interactions (/search)
  • Django form enhancement with $action(..., {}, { form }) (/profile)
  • resumable SSE streams and a POST retry:false command → switch_to() → retryable read-only GET watcher workflow (/sse-demo)

Run steps are documented in the example project's README under example/.

The project website also includes a live command-to-query demo. It intentionally interrupts the read-only watcher and exposes its reconnect state, separate request IDs, continuous loading lifecycle, and one-time command execution in the page.

Page navigation