DEV Community 👩‍💻👨‍💻

Discussion on: User registration and authorization on a django API with djoser and JSON web tokens.

skydler profile image
Leonel Mandarino

Hi, nice post! it's very helpfull.

But using djoser and creating the user endpoints would make 2 endpoints for retrieving and listing users, wouldn't it? is this a problem?

lewiskori profile image
Lewis kori • Edited on

Hey. Yes it would.

The best way to add extra fields is to extend django user model with AbstractUser, then place those extra fields in the REQUIRED_FIELDS array.
That way the djoser /auth/users/ endpoints can recognize the additional fields on the CustomUser model.

I had initially made the user profile to demonstrate signals to the readers :)