Closed angela-tran closed 3 weeks ago
Thanks @lalver1 for updating the issue description 🙏
Here's a section from Django docs on CSS variables that drive the admin site's theming, in case it's helpful: https://docs.djangoproject.com/en/5.1/ref/contrib/admin/#theming-support
No problem @angela-tran 🙂
Ah, thanks for that! I was actually looking at how to override the template that admin
uses, so this is very helpful!
@lalver1 and I met earlier to talk through how to conditionally show the home dashboard and the default index page. I had originally been thinking we would just override admin/index.html
and use conditionals on the user to determine what to show, but after going through some of it with Luis, we came to the consensus that it'll be much cleaner to have a separate template.
The default index page is returned by the AdminSite.index
function, so in order to return a different template for transit agency staff users, we need to override this function.
Luis and I worked through putting the necessary configuration in place correctly so that there are no regressions and so that he can override index
.
This ticket is pretty big. The plan is to do it in 3 PRs:
index
view function, except for the top-right {% usertools %}
block{% usertools %}
blockcc @lalver1
Acceptance criteria
/admin
for a transit agency user shows the home dashboard UI (see mockup below)/admin
for a superuser or Cal-ITP user shows the default Django admin index2268 will implement the "Transit processor" link, so don't worry about that part of the UI for this ticket.