summaryrefslogtreecommitdiffstats
path: root/core/htmx.py
blob: c83fba942f9969756a029ab67bc547828ac21f85 (plain)
1
2
3
4
5
6
7
8
9
10
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