django-musician/musician/mixins.py
2019-10-25 13:33:37 +02:00

15 lines
348 B
Python

from django.views.generic.base import ContextMixin
from . import get_version
class CustomContextMixin(ContextMixin):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
# TODO generate menu items
context.update({
'version': get_version(),
})
return context