# Different UserAdmin for different administrators in Django Admin

**URL:** <https://forum.djangoproject.com/t/different-useradmin-for-different-administrators-in-django-admin/11288>\
**Category:** The Admin\
**Created:** [December 29, 2021, 12:57pm UTC](https://forum.djangoproject.com/t/different-useradmin-for-different-administrators-in-django-admin/11288 "2021-12-29T12:57:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pitagora04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/pitagora04/32/1019_2.png) [@pitagora04](https://forum.djangoproject.com/u/pitagora04)\
**Post date:** [December 29, 2021, 12:57pm UTC](https://forum.djangoproject.com/t/different-useradmin-for-different-administrators-in-django-admin/11288/1 "2021-12-29T12:57:23Z")

</div>

There are 2 users in my Django Admin app: **admin** which is `superauser` and **editor** which is `staff`:

- **admin** can do everything,
- **editor** has pemissions on **blog** application to be able to manage blog posts, categories, tags, etc.
- **editor** has no pemission on **auth** application which means editor cannot manage users and permissions.

Now I would like to allow **editor** to be able to create new users with this restrictions:

- **editor** can only manage users which are NOT `superadmin` or `staff`,
- **editor** cannot even see `superadmin` or `staff` users,
- when creating new user, **editor** should be able to set only `active` setting in **Permissions** area (`superuser`, `staff`, `user permissions` and `groups` should be either disabled or even better not shown).

**How can I achieve this ?**

One way would be to have 2 different User Admin pages:

- standard/default User Admin page for my `superadmin` users,
- customized User Admin page for my `staff` users.  
But I’m not sure if that is possible - when I tried to register different UserAdmin page I got error `django.contrib.admin.sites.AlreadyRegistered: The model User is already registered with 'auth.UserAdmin'`.

So what would you suggest ?

Thank you!

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [December 29, 2021, 5:17pm UTC](https://forum.djangoproject.com/t/different-useradmin-for-different-administrators-in-django-admin/11288/2 "2021-12-29T17:17:57Z")

</div>

Yes, it is possible to do what you describe.

You’ve got a whole page in the docs at [The Django admin site | Django documentation | Django](https://docs.djangoproject.com/en/4.0/ref/contrib/admin/#modeladmin-options) that describe the options available within the ModeAdmin class.

For example, the [get\_queryset](https://docs.djangoproject.com/en/4.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_queryset) method lets you identify which objects are visible to a user. (See the example!) The [get\_list\_display](https://docs.djangoproject.com/en/4.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_list_display) lets you dynamically define which fields get shown in the listing page, where [get\_fields](https://docs.djangoproject.com/en/4.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_fields) lets you specify which fields are shown on the details page.

So it can be done - it’s up to you to decide if it’s worth it to you to define all these functions, or if you just want to create “staff-specific” views to edit those models and not try to wedge this functionality into the admin. (My opinion is that it’s going to be a lot easier in the long run to just create your own specific pages rather than jamming this into the admin. So my suggestion would be to create custom pages for this.)

---

<div class="post-metadata">

**Author:** ![Jpdude](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/jpdude/32/17315_2.png) [@Jpdude](https://forum.djangoproject.com/u/Jpdude)\
**Post date:** [November 24, 2023, 10:02am UTC](https://forum.djangoproject.com/t/different-useradmin-for-different-administrators-in-django-admin/11288/3 "2023-11-24T10:02:29Z")

</div>

Wonderful and informative response. Please i would like to know if it is possible to incorporate the ease of registering models(admin.site.register(“your model”)),in your custom admin for your app or is it something you have to hard code yourself. Thank you in advance.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [November 24, 2023, 1:37pm UTC](https://forum.djangoproject.com/t/different-useradmin-for-different-administrators-in-django-admin/11288/4 "2023-11-24T13:37:03Z")

</div>

Use of the `admin.site.register` method is documented at [ModelAdmin objects](https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#modeladmin-objects)

But I’m not sure I understand what you’re asking for here.

---

<div class="post-metadata">

**Author:** ![Jpdude](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/jpdude/32/17315_2.png) [@Jpdude](https://forum.djangoproject.com/u/Jpdude)\
**Post date:** [November 24, 2023, 2:06pm UTC](https://forum.djangoproject.com/t/different-useradmin-for-different-administrators-in-django-admin/11288/5 "2023-11-24T14:06:14Z")

</div>

Woah. First of all thanks for the speedy and indeed helpful reply. That piece of documentation is exactly what I needed for what I wanted to implement in my app. Sorry for ignorance on my side. Thanks a lot, you saved me a lot of time.
