Python2的写法用的是
def __unicode__(self):
return self.name
而python3中写法是
def __str__(self):
return self.name
Python2的写法用的是
def __unicode__(self):
return self.name
而python3中写法是
def __str__(self):
return self.name