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

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -