﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34162	"Wrong URL generated by get_admin_url in admin index ""Recent Actions"" panel in custom Django Admin Site"	Rigoberto Villalta	nobody	"When a custom Admin Site is generated the method {{{ get_admin_url }}} of the class {{{ LogEntry }}} in {{{ contrib/admin/models }}} generates a link to {{{ /admin/... }}} instead of {{{ /custom-admin/... }}}

This is the code of the method:

{{{
if self.content_type and self.object_id:
            url_name = ""admin:%s_%s_change"" % (
                self.content_type.app_label,
                self.content_type.model,
            )
            try:
                return reverse(url_name, args=(quote(self.object_id),))
}}}

The problem here is that the class LogEntry has not an instance of Admin Site as in this ticket: [https://code.djangoproject.com/ticket/33077] .

I have tested this bug in Django 3.2, 3.1 and 4.0
"	Bug	closed	contrib.admin	4.0	Normal	duplicate			Unreviewed	0	0	0	0	0	0
