Error when extending the default user model

Error when extending the default user model and using createsuperuser:

python manage.py createsuperuser
Username: white
Email address:  ****
Password: 
Password (again): 
CommandError: This field cannot be blank.; This field cannot be blank.; This field cannot be blank.; This field cannot be blank.; This field cannot be blank.; This field cannot be blank.; This field cannot be blank.; This field cannot be null.; This field cannot be null.

My model:

class User(AbstractUser):
    country = models.CharField(max_length=120, default='')
    city = models.CharField(max_length=120, default='') 
    street_name = models.CharField(max_length=120, default='')
    postcode = models.CharField(max_length=20, default='')  
    additional_address_details = models.CharField(max_length=500, default='')  
    phone_number = models.CharField(max_length=20, default='')
    wish_list = models.OneToOneField("WishList", on_delete=models.CASCADE)
    basket = models.OneToOneField("Basket", on_delete=models.CASCADE)
    images = GenericRelation("Image")

Also some customizations in settings.py:

AUTH_USER_MODEL = "furbar.User"
INSTALLED_APPS = [
    'furbar.apps.FurbarConfig',
    'django.contrib.auth',
    'django.contrib.admin',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

admin.py:

from django.contrib import admin
from . import models
from django.contrib.auth.admin import UserAdmin

admin.site.register(models.User, UserAdmin)

This method (instead of using OneToOneField to extend the standard model) was chosen after recommendations along the lines of “it’s more correct” (honestly, I don’t know why it’s more correct, but I preferred to listen to the “experienced” (I guess))

By adding parameters blank=True, null=True in the fields definition I solved the problem, but it is not exactly what I would like, because then in the admin the corresponding fields are not displayed for my model

Hi,

You must define the REQUIRED_FIELDS attribute of your user model class with the list of fields that do not accept a null/blank value: see Customizing authentication in Django | Django documentation | Django