django-musician/musician/mixins.py

15 lines
348 B
Python
Raw Normal View History

2019-10-25 11:33:37 +00:00
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