Thanks for clarifying Jacob, great. So, the registered content_types are in the available_apps key to the context passed to that tag. (Currently that needs reconstructing in a filter/comprehension, but it could feasibly be added to the `AdminSite.each_context` method.) Adding the matching `__in` lookup to the filter call there should allow retricting to only registered models no?
I'm personally sceptical that a "I added the same model to multiple AdminSites and need to see only actions for each model from the AdminSite that it occurred on" use-case is one we should cover. That's pretty niche I'd say. Kind Regards, Carlton On Thu, 26 Jan 2023 at 10:01, Jacob Rief <jacob.r...@gmail.com> wrote: > Hi Carlton, > > As I understand it, separate admin sites may register different models, > but I'm only going to see the History for instances that are visible to the > current admin no? > > The Django admin interface uses a templatetag named get_admin_log. It > renders the content of all entries of model LogEntry filtered by the > current user. > Check here for details: > https://github.com/django/django/blob/34b328814976a2e2f7907361a494202763649f3f/django/contrib/admin/templatetags/log.py#L14 > If you instantiate more than one Django-Admin interface, the logged in > user therefore sees all his actions, regardless of the chosen admin > instance. > > My proposal would be to add another column to LogLevel containing the name > of the admin interface. That column then shall be used as an additional > filter. > It should also be possible to swap that model against a compatible > implementation, for instance if someone separates the admin interface > because he also > separated the underlying databases. > > Maybe you mean the Recent actions > My actions bit of the index page? (I > didn't check but, if not already, could that list be filtered by the > content type of registered models for the current admin? 🤔) > > Yes, that's what I wrote and intended. > > – Jacob > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/bfcd58e8-bbf1-42bc-a7dc-25a788e47b1en%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/bfcd58e8-bbf1-42bc-a7dc-25a788e47b1en%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJwKpyT0yGSrZGrRcH%2ByRk2vhpKgBjANo_xuDuTe5p60m-BuPw%40mail.gmail.com.