whoisearth
whoisearth

Reputation: 4160

django - override User model entries

Is it possible to override the name of both is_superuser and is_staff to custom values?

Nothing I'm seeing would make it possible I'm guessing the alternative would be to do an AbstractUser and then make new values for what is required like is_admin and then reference that boolean instead and hide the is_staff as an example from all forms?

Upvotes: 0

Views: 46

Answers (1)

gallen
gallen

Reputation: 1292

The documentation recommends that if you are unhappy with the built-in User model to extend AbstractBaseUser and implement your own custom User class.

You will need to add additional values (AUTH_USER_MODEL in Django 1.10) in your settings file to tell Django to use the new model.

Upvotes: 1

Related Questions