Documentation

HyperDjango Documentation

Start here for the core ideas, the Django-first mental model, and how the docs are organized.

Start with Getting Started, then move through routing, rendering, and the reference pages once the core concepts are clear.

HyperDjango gives Django a server-first workflow with file routing, colocated assets, and hypermedia actions.

Use it when you want interactive UX without splitting your app into separate backend API and SPA frontend codebases.

Core Ideas

  • file-based routing for Django pages
  • automatic asset loading for pages, layouts, and template packages
  • hypermedia actions that return HTML, events, redirects, history updates, and small client patches

Relationship to Alpine

HyperDjango works without Alpine, but Alpine is the client-side library it integrates with most closely.

  • HyperDjango core: works with plain JavaScript through hyper.js
  • Alpine integration: recommended layer for $action(...) and signal patching

Documentation Map

The docs are split by concept ownership:

  • start with getting a page working
  • then learn routing, rendering, layouts, and actions
  • then learn client-side invocation and declarative HTML APIs
  • use the reference section for exact runtime details
Related guides

Getting Started

Install HyperDjango, wire Django settings, mount routes, and build the first page and action.

Routing

Learn file-based routing, nested pages, dynamic params, typed params, regex routes, and reverse names.

Pages and Rendering

Understand HyperView, plain Django View, render helpers, template packages, and standalone template rendering.

Layouts

Use reusable layout packages in hyper/layouts to share templates, assets, and server behavior.

Base Template

Understand the shipped hyperdjango/base.html template, what it includes by default, and how to replace it safely.

Actions

Write HyperDjango actions, return typed response items, and understand immediate versus streaming responses.

Client-Side Actions

Invoke actions from Alpine or plain JavaScript and understand sync, key, upload progress, and runtime events.

Declarative HTML APIs

Use hyper-form-disable, hyper-loading, and hyper-view-transition-name when declarative HTML is clearer than inline JavaScript.

Alpine Integration

Learn how HyperDjango integrates with Alpine through $action, local signal patches, and the global $store.hyper bridge.

Assets and Vite

Understand automatic entry discovery, Vite development and production asset loading, and template asset tags.

Troubleshooting

Debug common issues such as missing targets, CSRF failures, route conflicts, and view transition expectations.

Production Checklist

Validate production settings, caching, static assets, and request behavior before shipping HyperDjango pages.

FAQ

Quick answers for View vs HyperView, layout choices, render helpers, Alpine, and action return patterns.

Guides

Getting Started

Install HyperDjango, wire Django settings, mount routes, and build the first page and action.

Routing

Learn file-based routing, nested pages, dynamic params, typed params, regex routes, and reverse names.

Pages and Rendering

Understand HyperView, plain Django View, render helpers, template packages, and standalone template rendering.

Layouts

Use reusable layout packages in hyper/layouts to share templates, assets, and server behavior.

Base Template

Understand the shipped hyperdjango/base.html template, what it includes by default, and how to replace it safely.

Actions

Write HyperDjango actions, return typed response items, and understand immediate versus streaming responses.

Client-Side Actions

Invoke actions from Alpine or plain JavaScript and understand sync, key, upload progress, and runtime events.

Declarative HTML APIs

Use hyper-form-disable, hyper-loading, and hyper-view-transition-name when declarative HTML is clearer than inline JavaScript.

Alpine Integration

Learn how HyperDjango integrates with Alpine through $action, local signal patches, and the global $store.hyper bridge.

Assets and Vite

Understand automatic entry discovery, Vite development and production asset loading, and template asset tags.

Troubleshooting

Debug common issues such as missing targets, CSRF failures, route conflicts, and view transition expectations.

Production Checklist

Validate production settings, caching, static assets, and request behavior before shipping HyperDjango pages.

FAQ

Quick answers for View vs HyperView, layout choices, render helpers, Alpine, and action return patterns.