Django Model Mixin

Django -- Posted on May 26, 2019

Django model mixin

              
                class ModelMixin:
    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context.update({
            'model': self.model
        })
        return context
                  
   
            

Related Posts