expalert/frontend/mixins.py
2023-12-04 16:09:40 +01:00

17 lines
440 B
Python

class KumiMixin:
"""A mixin that adds the Kumi context to the view
"""
def get_context_data(self, **kwargs):
"""Add the Kumi context to the view
Args:
**kwargs: Additional keyword arguments
Returns:
dict: The context
"""
context = super().get_context_data(**kwargs)
context["title"] = self.title if hasattr(self, "title") else ""
return context