class CustomUser(AbstractBaseUser, PermissionsMixin):
    email = models.EmailField(max_length=254, unique=True, db_index=True,
        primary_key=True)
USERNAME_FIELD = 'email'
django user model and custom primary key field