IN my views.py , i want to get the Model name from self
I tried this self.__class__.__name__
but it gave me the class name of view not the Model
EDIT:
class ObjectCreate(CreateView):
def get_template_names(self):
m = self.__class__.__name__
You can do that, in a model view, self is not an object model instance.
You should write:
Edited 6 years later due ihhcarus comment: