2022-11-22 18:21:01 -08:00
|
|
|
class HTMXMixin:
|
2022-12-05 09:38:37 -08:00
|
|
|
template_name_htmx: str | None = None
|
2022-11-22 18:21:01 -08:00
|
|
|
|
|
|
|
def get_template_name(self):
|
|
|
|
if self.request.htmx and self.template_name_htmx:
|
|
|
|
return self.template_name_htmx
|
|
|
|
else:
|
|
|
|
return self.template_name
|