unicode (self) 不适合我。我仍然可以在管理员中看到“名称对象”。我的代码如下:
import datetime # standard python datetime module
from django.db import models # Djangos time-zone-related utilities
from django.utils import timezone
class Name(models.Model):
name = models.CharField(max_length=200)
def __unicode__(self): # Python 3: def __str__(self):
return self.name
感谢您