python - Keep User and Group in same section in Django admin panel -
i have made own user
model in django 1.8 with
from django.contrib.auth.models import abstractuser, group, permission class myuser(abstractuser): pass
but not figure in admin longer.
i have tried adding admin page with
from django.contrib.auth import get_user_model, models auth_models django.contrib.auth.admin import useradmin usermodel = get_user_model() class myuseradmin(useradmin): pass admin.site.register(usermodel, myuseradmin)
and figure in admin in different 'section' group
. how can keep user
in default section in admin panel?
you need add app_label
meta class of myuser.
class myuser(abstractuser): pass class meta: app_label = 'auth'
official documentation on app_label.
Comments
Post a Comment