There will be 3 users in this application: admin, teacher and student. Each having different permissions and views. So how am I suppose to inherit the abstractbaseuser ID to the student and teacher model for each user created ? Thanks in advance
That’s not typically how such a structure is created in Django.
There’s only 1 “User” model. You can then have one or more “profile” models associated with that user if there are differences in the data stored for each type of user.
Permissions are generally assigned to
Group objects. So you would assign each user to one or more of those groups. You could also use the management of those groups to allow for the management of those profile models.
Then for the project that I am currently working on. The id highlighted in yellow is the base user id which I could encrypt in jwt, but how should I create the views to get values for other fields (fullName, room_no, phone, etc.) ?
Are you familiar with the concept of a profile model in Django?
If not, see https://docs.djangoproject.com/en/4.1/topics/auth/customizing/#extending-the-existing-user-model