0

Let's say I am building a social networking website that has nothing do with admin and superuser. But I still have to include these fields while making custom user model. This is going to be a simple model that has user's profile information not that user is admin or superuser.

Can anyone explain why do we always need these fields to be there. Can we get rid of them and still create a Custom user model or do we always need them.

Casper
  • 77
  • 4

1 Answers1

0

There is no constraint mentioned in the Django documentation that the AUTH_USER_MODEL specified should have is_superuser or is_staff flags. The minimum requirements for creating a custom user model is specified here

It is upto your business requirement to decide whether or not to follow them. But if your auth model does not have those flags, then it will not be possible for even you (the admin) to access the admin portal. So there is no harm in having the flag turned off for everyone.

Aswin Murugesh
  • 10,831
  • 10
  • 40
  • 69
  • Does that mean In production environment django uses same user model for website users and for admin. ? – Casper Dec 30 '18 at 00:57