具体来说,我正在寻找使用 Django 的架构迁移,这是我的一些代码:
从
class Login(models.Model):
username = models.CharField(max_length=30)
password = models.CharField(max_length=30)
email = models.EmailField()
member_date = models.DateTimeField()
def __unicode__(self):
return self.username
至
class Login(models.Model):
username = models.CharField(max_length=30)
password = models.CharField(max_length=30)
email = models.EmailField()
member_date = models.DateTimeField(auto_now_add=True, blank=True) # changes here
def __unicode__(self):
return self.username