From 3fbeee4b8ceeb83708f45953b34235bc8d2980b1 Mon Sep 17 00:00:00 2001 From: Sarthak Jariwala Date: Wed, 5 Feb 2025 15:37:27 -0800 Subject: [PATCH] add sections to manual installation --- docs/guide/server-side-setup.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/guide/server-side-setup.md b/docs/guide/server-side-setup.md index 526f5e0..015acf3 100644 --- a/docs/guide/server-side-setup.md +++ b/docs/guide/server-side-setup.md @@ -68,6 +68,8 @@ You're all set! You can now start your development server. Skip this section if you used the [template based setup](#template-based-setup) method. ::: +### Install dependencies + Install the `inertia-django` server-side adapter and related dependencies. ::: code-group @@ -81,6 +83,8 @@ python -m pip install inertia-django django-vite ``` ::: +### Update installed apps + Add `django_vite` and `inertia` to your `INSTALLED_APPS` in `settings.py`. ```python @@ -91,6 +95,8 @@ INSTALLED_APPS = [ ] ``` +### Update middleware + Next, add `inertia.middleware.InertiaMiddleware` to your `MIDDLEWARE` in `settings.py`. ```python @@ -100,6 +106,8 @@ MIDDLEWARE = [ ] ``` +### Configure settings + Configure `django-vite` and `inertia-django` specific settings in `settings.py`. ```python @@ -130,6 +138,8 @@ INERTIA_LAYOUT = "base.html" # update with your base template name > For a complete list of available `inertia-django` settings, see [readme](https://github.com/inertiajs/inertia-django?tab=readme-ov-file#settings). +### Update base template + In your base html template, add the following: ```html