|
24 | 24 | python -m pip install django-simple-nav |
25 | 25 | ``` |
26 | 26 |
|
27 | | -1. **Add `django_simple_nav` to `INSTALLED_APPS`.** |
| 27 | +2. **Add `django_simple_nav` to `INSTALLED_APPS`.** |
28 | 28 |
|
29 | 29 | After installation, add `django_simple_nav` to your `INSTALLED_APPS` in your Django settings: |
30 | 30 |
|
|
36 | 36 | ] |
37 | 37 | ``` |
38 | 38 |
|
39 | | -1. **Adjust your Django project's settings.** |
| 39 | +3. **Adjust your Django project's settings.** |
40 | 40 |
|
41 | 41 | If you plan to use the permissions feature of `django-simple-nav` to filter your navigation items based on the `request.user`, `django.contrib.auth` and `django.contrib.contenttypes` must be added to your `INSTALLED_APPS` as well: |
42 | 42 |
|
|
51 | 51 |
|
52 | 52 | If you do not add `django.contrib.auth` to your `INSTALLED_APPS` and you define any permissions for your navigation items, `django-simple-nav` will simply ignore the permissions and render all items regardless of whether the permission check is `True` or `False.` |
53 | 53 |
|
54 | | -1. **Add the template function to your Jinja environment** |
| 54 | +4. **Add the template function to your Jinja environment** |
55 | 55 |
|
56 | 56 | If you want to use Jinja 2 templates you will need to add the `django_simple_nav` function to your Jinja environment. |
57 | 57 | Example: |
|
221 | 221 |
|
222 | 222 | Note that unlike in Django templates we need to index the `items` field as a string in Jinja. |
223 | 223 |
|
224 | | -1. **Integrate navigation in templates.**: |
| 224 | +3. **Integrate navigation in templates.**: |
225 | 225 |
|
226 | 226 | Use the `django_simple_nav` template tag in your Django templates (the `django_simple_nav` function in Jinja) where you want to display the navigation. |
227 | 227 |
|
@@ -318,21 +318,21 @@ You can run the example project by following these steps. These steps assume you |
318 | 318 | cd django-simple-nav |
319 | 319 | ``` |
320 | 320 |
|
321 | | -1. **Create a new virtual environment, activate it, and install `django-simple-nav`.** |
| 321 | +2. **Create a new virtual environment, activate it, and install `django-simple-nav`.** |
322 | 322 |
|
323 | 323 | ```bash |
324 | 324 | python -m venv venv |
325 | 325 | source venv/bin/activate |
326 | 326 | python -m pip install . |
327 | 327 | ``` |
328 | 328 |
|
329 | | -1. **Run the example project.** |
| 329 | +3. **Run the example project.** |
330 | 330 |
|
331 | 331 | ```bash |
332 | 332 | python example/demo.py |
333 | 333 | ``` |
334 | 334 |
|
335 | | -1. **Open your browser to `http://localhost:8000` to see the examples in action.** |
| 335 | +4. **Open your browser to `http://localhost:8000` to see the examples in action.** |
336 | 336 |
|
337 | 337 | ## Documentation |
338 | 338 |
|
|
0 commit comments