如果我有以下型号:
class User(AbstractBaseUser):
Fname = models.CharField(max_length = 20, blank = False)
Lname = models.CharField(max_length = 20, blank = False)
email = models.EmailField(max_length = 254, unique = True, db_index = True)
USERNAME_FIELD = 'email'
在shell中我尝试:
user = User()
user.save()
不应该将用户存储到数据库中,但确实如此。有什么建议吗?