Get the name to use for the object. For context_object_name=None
Doc:For example Article will be article Why we use context_object_name in createview.We don't have a object,we just have a simple form to show users.
def get_context_object_name(self, obj):
"""Get the name to use for the object."""
if self.context_object_name:
return self.context_object_name
elif isinstance(obj, models.Model):
return obj._meta.model_name
else:
return None
Please somebody help me???