|
52 | 52 | TAILWIND_APP_NAME = 'theme'
|
53 | 53 | ```
|
54 | 54 |
|
55 |
| -6. Make sure that the `INTERNAL_IPS` list is present in the `settings.py` file and contains the `127.0.0.1` ip address: |
56 |
| - |
57 |
| - ```python |
58 |
| - INTERNAL_IPS = [ |
59 |
| - "127.0.0.1", |
60 |
| - ] |
61 |
| - ``` |
62 |
| - |
63 |
| -7. Install *Tailwind CSS* dependencies, by running the following command: |
| 55 | +6. Install *Tailwind CSS* dependencies, by running the following command: |
64 | 56 |
|
65 | 57 | ```bash
|
66 | 58 | python manage.py tailwind install
|
67 | 59 | ```
|
68 | 60 |
|
69 |
| -8. The *Django Tailwind* comes with a simple `base.html` template located at |
| 61 | +7. The *Django Tailwind* comes with a simple `base.html` template located at |
70 | 62 | `your_tailwind_app_name/templates/base.html`. You can always extend or delete it if you already have a layout.
|
71 | 63 |
|
72 |
| -9. If you are not using the `base.html` template that comes with *Django Tailwind*, add `{% tailwind_css %}` to |
| 64 | +8. If you are not using the `base.html` template that comes with *Django Tailwind*, add `{% tailwind_css %}` to |
73 | 65 | the `base.html` template:
|
74 | 66 |
|
75 | 67 | ```html
|
|
85 | 77 | The `{% tailwind_css %}` tag includes Tailwind's stylesheet.
|
86 | 78 |
|
87 | 79 |
|
88 |
| -10. Let's also add and configure `django_browser_reload`, which takes care of automatic page and css refreshes in the |
| 80 | +9. Let's also add and configure `django_browser_reload`, which takes care of automatic page and css refreshes in the |
89 | 81 | development mode. Add it to `INSTALLED_APPS` in `settings.py`:
|
90 | 82 |
|
91 | 83 | ```python
|
|
97 | 89 | ]
|
98 | 90 | ```
|
99 | 91 |
|
100 |
| -11. Staying in `settings.py`, add the middleware: |
| 92 | +10. Staying in `settings.py`, add the middleware: |
101 | 93 |
|
102 | 94 | ```python
|
103 | 95 | MIDDLEWARE = [
|
|
110 | 102 | The middleware should be listed after any that encode the response, such as Django’s `GZipMiddleware`. The middleware
|
111 | 103 | automatically inserts the required script tag on HTML responses before `</body>` when `DEBUG` is `True.`
|
112 | 104 |
|
113 |
| -12. Include `django_browser_reload` URL in your root `url.py`: |
| 105 | +11. Include `django_browser_reload` URL in your root `url.py`: |
114 | 106 |
|
115 | 107 | ```python
|
116 | 108 | from django.urls import include, path
|
|
120 | 112 | ]
|
121 | 113 | ```
|
122 | 114 |
|
123 |
| -13. Finally, you should be able to use *Tailwind CSS* classes in HTML. Start the development server by running the |
| 115 | +12. Finally, you should be able to use *Tailwind CSS* classes in HTML. Start the development server by running the |
124 | 116 | following command in your terminal:
|
125 | 117 |
|
126 | 118 | ```bash
|
|
0 commit comments