title: Addig form fields to a custom user model in django admin panel
body: <p>I'm going through the <a href="https://djangoforbeginners.com/" rel="nofollow noreferrer">django for beginners book</a>, testing the code from the chapter 8 about the <a href="https://github.com/wsvincent/djangoforbeginners/tree/master/ch8-custom-user-model" rel="nofollow noreferrer">Custom user model</a>. The goal is to add the field <code>age</code> in the auth user model by subclassing the <code>AbstractUser</code> model.</p>
  
  <p>First we create out <code>CustomUser</code> in <code>models.py</code></p>
  
  <pre><code>from django.db import models
  from django.contrib.auth.models import AbstractUser
  
  class CustomUser(AbstractUser):
      age = models.PositiveIntegerField(null=True, blank=True)
  </code></pre>
  
  <p>Then creating <code>CustomUserCreationFrom</code> and <code>CustomUserChangeFrom</code> in <code>forms.py</code>:</p>
  
  <pre><code>from django import forms
  from django.contrib.auth.forms import UserCreationForm, UserChangeForm
  
  from .models import CustomUser
  
  class CustomUserCreationFrom(UserCreationForm):
      class Meta(UserCreationForm.Meta):
          model = CustomUser
          fields = UserCreationForm.Meta.fields + ('age',)
  
  class CustomUserChangeFrom(UserChangeForm):
      class Meta(UserChangeForm.Meta):
          model = CustomUser
          fields = UserChangeForm.Meta.fields
  </code></pre>
  
  <p>And finally, the <code>CustomUserAdmin</code> in <code>admin.py</code>:</p>
  
  <pre><code>from django.contrib import admin
  from django.contrib.auth.admin import UserAdmin
  
  from .forms import CustomUserCreationFrom, CustomUserChangeFrom
  from .models import CustomUser
  
  class CustomUserAdmin(UserAdmin):
      add_form = CustomUserCreationFrom
      form = CustomUserChangeFrom
      model = CustomUser
      list_display = ['username', 'email', 'age', 'is_staff',]
  
  admin.site.register(CustomUser, CustomUserAdmin)
  </code></pre>
  
  <p>And of course telling django about our custom auth model in <code>settings.py</code>:</p>
  
  <pre><code>AUTH_USER_MODEL = 'users.CustomUser'
  </code></pre>
  
  <hr>
  
  <p>Logged as a super user, and when trying to add a new user, there is no field <code>age</code> in the creation form.</p>
  
  <p><a href="https://i.stack.imgur.com/0sHfy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0sHfy.png" alt="enter image description here"></a></p>
  
  <p>Am I missing something?</p>