Skip to content

Commit a0b728a

Browse files
committed
Add the django-htmx app to the stack
Signed-off-by: tdruez <[email protected]>
1 parent 033f975 commit a0b728a

File tree

5 files changed

+5
-15
lines changed

5 files changed

+5
-15
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ dependencies = [
4343
"django-filter==25.1",
4444
"djangorestframework==3.16.1",
4545
"django-taggit==6.1.0",
46+
"django-htmx==1.24.0",
4647
# Database
4748
"psycopg[binary]==3.2.9",
4849
# wait_for_database Django management command

scancodeio/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@
198198
"django_rq",
199199
"django_probes",
200200
"taggit",
201+
"django_htmx",
201202
]
202203

203204
MIDDLEWARE = [
@@ -208,6 +209,7 @@
208209
"django.contrib.auth.middleware.AuthenticationMiddleware",
209210
"django.contrib.messages.middleware.MessageMiddleware",
210211
"django.middleware.clickjacking.XFrameOptionsMiddleware",
212+
"django_htmx.middleware.HtmxMiddleware",
211213
"scancodeio.middleware.TimezoneMiddleware",
212214
]
213215

scancodeio/static/htmx-2.0.4.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

scancodeio/static/htmx-2.0.4.min.js.ABOUT

Lines changed: 0 additions & 13 deletions
This file was deleted.

scanpipe/templates/scanpipe/base.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{% load static %}
2+
{% load django_htmx %}
23
<!DOCTYPE html>
34
<html lang="en">
45
<head>
@@ -18,7 +19,7 @@
1819
<script src="{% static 'fontawesome-6.7.2/all.min.js' %}" crossorigin="anonymous" defer></script>
1920
<script src="{% static 'highlight-10.6.0.min.js' %}" crossorigin="anonymous"></script>
2021
<script src="{% static 'bulma-toast-2.4.1.min.js' %}" crossorigin="anonymous" defer></script>
21-
<script src="{% static 'htmx-2.0.4.min.js' %}" crossorigin="anonymous" defer></script>
22+
{% htmx_script %}
2223
{% block scripts %}{% endblock %}
2324
</body>
2425
</html>

0 commit comments

Comments
 (0)