﻿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
19554	"ChangeList.url_for_result work only for ""admin"" Site"	tecnosegugio@…	nobody	"In django/contrib/admin/views/main.py the ChangeList.url_for_result method contains a format string with an hardcode ""admin:"".
With this string it's hard to get the correct URLs in a result list in an Admin Site different than the default.

As a workaround, I've edited the method as follow:

{{{
def url_for_result(self, result):
    pk = getattr(result, self.pk_attname)
    return reverse('%s:%s_%s_change' % (     # edited the format string
        self.model_admin.admin_site.name,    # added this parameter
        self.opts.app_label,
        self.opts.module_name),
        args=(quote(pk),),
        current_app=self.model_admin.admin_site.name
    )
}}}"	Uncategorized	closed	contrib.admin	1.5-beta-1	Normal	invalid	Admin, AdminSite, ChangeList		Unreviewed	0	0	0	0	0	0
