-1

This is my model. When i make migrations it is not showing up on my admin page.

class User(AbstractUser):
    # TODO User will be associated with one or more chama accounts
    id_number = models.IntegerField(default=0)
    phone_number = models.IntegerField(default=0)
    active_chama = models.ManyToManyField("Chama")
  • Have you followed the docs on how to configure your custom user model as the default user model and have you added a custom admin class? – Iain Shelvington Jan 12 '20 at 22:45

1 Answers1

3

You will have to set the AUTH_USER_MODEL setting in your settings.py if you use the AbstractUser model to create a custom one.

AUTH_USER_MODEL = "myApp.User"

Here is the relevant part in the docs

Edit:

Like stated in the comments you will have to register your custom model in your custom user apps admin.py

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

admin.site.register(User, UserAdmin)
LonnyT
  • 590
  • 1
  • 8
  • 21