My custom user model for login via email:
class MyUser(AbstractBaseUser):
id = models.AutoField(primary_key=True) # AutoField?
is_superuser = models.Int
Your User implementation is not providing the mandatory methods to be used with the Admin module.
See https://docs.djangoproject.com/en/3.0/ref/contrib/admin/#module-django.contrib.admin.
In your case, add the permissions mixin (PermissionsMixin), as a superclass of your model:
from django.contrib.auth.models import PermissionsMixin
class MyUser(AbstractBaseUser, PermissionsMixin):
# ...
It is described here : https://docs.djangoproject.com/en/3.0/topics/auth/customizing/#custom-users-and-permissions.
It works with Django 1.x, 2.x and 3.0.
EDIT: updated links to django version 3.0