Complete the code to import the AbstractUser class from Django's auth models.
from django.contrib.auth.models import [1]
The AbstractUser class is imported from django.contrib.auth.models to create a custom user model by extending it.
Complete the code to define a custom user model class named CustomUser that inherits from AbstractUser.
class CustomUser([1]): pass
The custom user model should inherit from AbstractUser to reuse Django's built-in user features.
Fix the error in the code to add a new field 'bio' as a TextField to the CustomUser model.
from django.db import models class CustomUser(AbstractUser): bio = models.[1]()
The bio field should be a TextField to store longer text data.
Fill both blanks to set the custom user model in Django settings.
AUTH_USER_MODEL = '[1].[2]'
The setting AUTH_USER_MODEL requires the app label and the model name separated by a dot. Here, 'accounts' is the app name and 'CustomUser' is the model.
Fill all three blanks to create a user instance with username 'alice' and bio 'Hello world'.
user = [1].objects.create_user(username='alice', [2]='Hello world') user.save()
Use the custom user model CustomUser to create a user. The bio field is set by the keyword argument 'bio'.