class User(AbstractBaseUser):
password = models.CharField(max_length=128)
username = models.CharField(unique=True, max_length=150)
is_superuser = models.IntegerField()
last_name = models.CharField(max_length=150)
phone = models.CharField(max_length=20)
email = models.CharField(max_length=254)
date_of_birth = models.DateTimeField()
date_joined = models.DateTimeField()
last_login = models.DateTimeField(blank=True, null=True)
is_staff = models.IntegerField(blank=True, null=True)
is_active = models.IntegerField(blank=True, null=True)
first_name = models.CharField(max_length=30, blank=True, null=True)
objects = UserManager()
USERNAME_FIELD = 'username'
REQUIRED_FIELDS = ['last_name', 'phone', 'email', 'date_of_birth']
def has_perm(self, perm, obj=None):
return True
def has_module_perms(self, app_label):
return True
class Meta:
db_table = 'auth_user'
This is my user model in app.models.py
I want to add foreign key into Class User. but i can`t ...
please help me