summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-22 19:21:01 -0700
committerAndrew Godwin2022-11-22 19:21:01 -0700
commit9c424d9bb6aa0eb606128bcce3e33816967a2e8d (patch)
tree6a30edbc00381ce919e17caa89d6eaad54c586e4 /core
parentaaad289c5211570ec98ddd9d753517ef827686dc (diff)
downloadtakahe-9c424d9bb6aa0eb606128bcce3e33816967a2e8d.tar.gz
takahe-9c424d9bb6aa0eb606128bcce3e33816967a2e8d.tar.bz2
takahe-9c424d9bb6aa0eb606128bcce3e33816967a2e8d.zip
Add manual HTMX refresh of timelines
Refs #33
Diffstat (limited to 'core')
-rw-r--r--core/htmx.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/htmx.py b/core/htmx.py
new file mode 100644
index 0000000..c83fba9
--- /dev/null
+++ b/core/htmx.py
@@ -0,0 +1,11 @@
+from typing import Optional
+
+
+class HTMXMixin:
+ template_name_htmx: Optional[str] = None
+
+ def get_template_name(self):
+ if self.request.htmx and self.template_name_htmx:
+ return self.template_name_htmx
+ else:
+ return self.template_name