﻿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
26998	admin.E013 check false positive on django-taggit	Aymeric Augustin	nobody	"After upgrading a project to Django 1.10, it failed to start because of a system check:

{{{
<class 'blog.admin.PostAdmin'>: (admin.E013) The value of 'fieldsets[2][1][""fields""]' cannot include the many-to-many field 'tags' because that field manually specifies a relationship model.
}}}

The corresponding M2M field is managed by django-taggit.

It's declared as follows:

{{{
    tags = TaggableManager(
        verbose_name=""libellés"", blank=True,
        through=TaggedPost, related_name='tag+')
}}}

and the manager is just:

{{{
class TaggedPost(TaggedItemBase):
    content_object = models.ForeignKey(""blog.Post"")
}}}

I suppose the intent of this check is to prevent developers from using the admin's M2M widget when the through model has extra fields.

However, in my case, the through model doesn't have extra fields, so the check isn't testing the right thing.

This issue didn't happen with Django 1.9 because the test for this check was written slightly differently and django-taggit slipped through the cracks.

It's likely possible to work around this issue with a hack in django-taggit, but it seems to me that this check doesn't use the right logic and could be improved, so I'm filing this ticket.

The corresponding issue django-taggit is https://github.com/alex/django-taggit/issues/430."	Bug	closed	contrib.admin	1.10	Release blocker	fixed		nate-djangoproject@… cmawebsite@… jonathan.morgan.007@…	Ready for checkin	1	0	0	0	0	0
