Answer the question
In order to leave comments, you need to log in
Django, how to extend a user?
Here's the code I'm trying to get new fields for the person:
class UserProfile(User):
class Meta:
db_table = 'users'
discount = models.FloatField(default=0)
is_add_review = models.BooleanField(default=False)
objects = UserManager()
Answer the question
In order to leave comments, you need to log in
Why is this all? Up to 1.5 you create a profile
class UserProfile(models.Model):
user = models.OneToOneField(User)
AUTH_USER_MODEL = 'myapp.MyUser'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question