﻿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
1259	[magic-removal][patch] mismatch between singular and plural for admin model URLs	Tom Tobin <korpios@…>	Adrian Holovaty	"There seems to be a mismatch as to how admin model URLs are constructed in magic-removal; as a result, log entries in the admin interface currently do not point to the valid URL path for their corresponding items.

In `contrib/admin/templatetags/adminapplist.py`, `admin_url` is built in the singular in the `render` method of `AdminApplistNode`:

{{{
'admin_url': '%s/%s/' % (app_label, m.__name__.lower()),
}}}

In `contrib/admin/models.py`, such a URL is built with pluralization in the `get_admin_url` method of `LogEntry`:

{{{
return ""%s/%s/%s/"" % (self.get_content_type().get_package(), self.get_content_type().python_module_name, self.object_id)
}}}

`python_module_name`, in turn, is originally constructed in `db/models/options.py` with the following:

{{{
get_module_name = lambda class_name: class_name.lower() + 's'
}}}

As I'm not certain which is intended as the final case (singular vs. plural), I have refrained from attempting a fix; I'll gladly work up a patch once I know which way this should go.
"	defect	closed	contrib.admin		normal	fixed			Unreviewed	1	0	0	0	0	0
