Is it advisable to name the class of a custom User Model ‘User’ or should I use a unique name such as ‘CustomUser’?
I have tested it with the class name as ‘User’ and it seems to work fine, however maybe down the line I will run into issues?
class User(AbstractBaseUser, PermissionsMixin):
or;
class CustomUser(AbstractBaseUser, PermissionsMixin):
Makes it explicitly clear that a “non-default” User object is being used.
Makes it easier to identify and resolve bugs created because of importing the wrong object. (Or, perhaps more accurately, it helps prevent those situations from occurring.)