expalert/frontend/mixins.py

17 lines
440 B
Python
Raw Normal View History

2023-12-04 15:09:40 +00:00
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