Skip to content

Commit 1907299

Browse files
committed
[#6] Setup HTMX.
1 parent c2f7797 commit 1907299

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

Diff for: audioapp/templates/audioapp/base.html

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE html>
33
<html>
44
<head>
5+
{% load static %}
6+
<script src="{% static 'js/htmx.min.js' %}" defer></script>
57
{% tailwind_css %}
68
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
79
</head>

Diff for: media/.DS_Store

6 KB
Binary file not shown.

Diff for: shortaudio/settings.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
'audioapp.apps.AudioappConfig',
4343
'tailwind',
4444
'theme',
45+
"django_htmx",
4546
]
4647

4748
MIDDLEWARE = [
@@ -53,6 +54,7 @@
5354
'django.contrib.messages.middleware.MessageMiddleware',
5455
'django.middleware.clickjacking.XFrameOptionsMiddleware',
5556
"allauth.account.middleware.AccountMiddleware",
57+
"django_htmx.middleware.HtmxMiddleware",
5658
]
5759

5860
ROOT_URLCONF = 'shortaudio.urls'
@@ -130,7 +132,7 @@
130132
# Static files (CSS, JavaScript, Images)
131133
# https://docs.djangoproject.com/en/5.0/howto/static-files/
132134

133-
STATIC_URL = 'static/'
135+
STATIC_URL = [BASE_DIR / "static"]
134136

135137
# Default primary key field type
136138
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field

Diff for: static/js/htmx.min.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)