A Django adapter for Inertia.js, enabling server-driven single-page applications with Django backends.
Inertia Django is the official Django adapter for Inertia.js, a framework that lets developers build single-page applications using server-side routing and controllers. It allows Django backends to serve fully reactive frontends built with React, Vue, or Svelte without requiring a separate REST or GraphQL API. The adapter handles data serialization, CSRF protection, and seamless integration between Django and Inertia.js.
Django developers who want to build modern, reactive single-page applications without maintaining a separate API layer or learning a new backend framework. It's ideal for teams familiar with Django's MVC pattern seeking a smoother full-stack development experience.
Developers choose Inertia Django because it eliminates the complexity of building and maintaining a separate API, leveraging Django's robust backend capabilities while delivering a fast, modern frontend. Its tight integration with Django's ecosystem, including built-in testing utilities and flexible prop serialization, provides a productive and familiar development workflow.
The Django adapter for Inertia.js
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides middleware for shared data, automated CSRF handling, and InertiaTestCase for testing, deeply embedding Inertia into Django's workflow without extra boilerplate.
Offers InertiaJsonEncoder for basic model serialization and InertiaMeta classes for custom field control, allowing tailored JSON output for Django models and QuerySets.
Supports optional and deferred props with grouping, partial reloads, and history encryption to reduce initial load times and secure sensitive data in browser history.
Enables SSR for improved SEO and faster initial renders via configurable settings like INERTIA_SSR_URL, though frontend setup is noted as 'Coming Soon'.
The README admits 'Django specific frontend docs coming soon,' forcing reliance on external examples and the main Inertia.js docs for setup, which can be confusing.
Default InertiaJsonEncoder uses Django's model_to_dict, excluding non-editable fields like auto timestamps, requiring extra work with InertiaMeta for full control.
Enabling SSR requires installing extra dependencies (e.g., requests) and configuring both backend and frontend, with frontend instructions incomplete, adding to setup complexity.