1👍
✅
That is because you are not returning anything from modeltestname
. If a function or method does not return anything explictly, it would return None
by default. Hence the result
So change the class method to
def modeltestname(self):
return self.content_object.name
Source:stackexchange.com