python - How to update standart Django model (auth_user) -
i add new field existing model (in case - user(auth_user)). example, there fields "first_name", "last_name", "email".. etc. please advise how best implement this?
you can extend or create own substitute user model. in point of view better create own.
from django.db import models django.contrib.auth.models import abstractuser class user(abstractuser): my_field = models.charfield(max_length = 150) and in settings.py
auth_user_model = 'myapp.user' i hope you.
Comments
Post a Comment