link custom admin page to button

I need two admin sites (one with all models, one with auth user model & my profile model). I have created my second site and now, I want to link my second site to a button but I am not sure of how and would appreciate any help!!

profiles/admin.py
image

mysite/urls.py

from profiles.admin import staff_site

urlpatterns = [
path(‘staffadmin/’, staff_site.urls)
]

templates/face_login.html

div
a href=“{% url ‘admin:index’ %}” class= “btn btn-outline-secondary btn-sm”>Administration /a
/div

currently, I have the URL linked to the original admin index page and it works but unsure of how to implement it for my second site…

Hi. As mentioned in the documentation (see The Django admin site | Django documentation | Django), what you are looking for is the purpose of the name parameter passed on admin site instanciation.

So, in you’re case, the url can be reversed by using StaffAdmin:index instead of admin:index

omg it worked, thank you so much!!!

i did try staffadmin too but I didn’t capitalise it cause admin was not Admin and it did not cross my mind and I just realised I named it StaffAdmin…