Django model mixin
1 2 3 4 5 6 7 | class ModelMixin:
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context.update({
'model': self.model
})
return context
|
Django model mixin
1 2 3 4 5 6 7 | class ModelMixin:
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context.update({
'model': self.model
})
return context
|