[Fixed]-Django 1.10 custom User 'is_superuser' clashes with the field 'is_superuser' from model

31👍

The is_superuser field is defined on PermissionMixin. However, AbstractUser also subclasses PermissionMixin, so you’re effectively inheriting from the same class twice. This causes the field clash, as older versions of Django don’t allow subclasses to override fields (recent versions allow to override fields that are defined on abstract base classes).

You either have to inherit from AbstractBaseUser and PermissionMixin, or from just AbstractUser. AbstractUser defines some additional fields, including username, is_staff and is_active, and some other things.

👤knbk

Leave a comment