diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/htmx.py | 11 |
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 |