0

I'm actually learning Django Rest Framework and I have this project that involves multiple user types so for example it consists of Students, Teachers and Admins each one with his attributes so I created a User model that inherits from AbstractUser and 3 other models for each type where each type has a foreign key of it's corresponding user. So here comes the problem how can I use Django-Rest-Auth library with these user types so for example when I use the register endpoint how can I modify it in order to create a Student in the students model based on the request data ?

I would appreciate any ones help.

Thanks in advance

  • You can try creating user roles (student, teacher, admin etc) instead of creating 3 different user models. Or, [This thread](https://stackoverflow.com/questions/55582710/how-to-use-multiple-user-models-in-django) might be helpful. – Harun Yilmaz Jan 07 '21 at 18:35
  • And this article also might be helpful: https://simpleisbetterthancomplex.com/tutorial/2018/01/18/how-to-implement-multiple-user-types-with-django.html – Harun Yilmaz Jan 07 '21 at 18:36

0 Answers0