Hi All!
I have a model structured something like this
class BaseUser(models.Model):
user_data = models.ForeignKey(settings.AUTH_USER_MODEL) #External Auth User Model
class Teacher(BaseUser):
pass
class Student(BaseUser):
pass
And I am adding all the models to Django admin like so.
for model in get_models(get_app('MyApp')):
admin.site.register(model)
In the admin panel, I can create/view a list of BaseUser
, Teacher
, and Student
. Where Teacher
/Student
are subsets of BaseUser
.
The Question
When a new user is created, it is automatically a BaseUser
.
Is there a way to change the class of an user from BaseUser
to Teacher
or Student
in the admin panel?