I would like to create new fields in the model of the Django's User system. I am following the official documentation, but I keep getting the same error:
My changes so far to the code have been the following:
models.py:
from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class User(AbstractUser):
bio = models.TextField(max_length=500,blank=True)
location = models.CharField(max_length=30, blank=True)
birth_date = models.DateField(null=True, blank=True)
admin.py
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .models import User
admin.site.register(User, UserAdmin)