﻿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
19774	contentypes generic module has core functionality plus admins-specific one	Ramiro Morales	Ramiro Morales	"(Copied and adapted from https://code.djangoproject.com/ticket/16368#comment:16)

Consider a project with a `foo` and a `bar` apps listed on `INSTALLED_APPS`:
* `foo` uses generic foreign keys, with the following `models.py`:
{{{
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic

class TaggedItem(models.Model):
    tag = models.SlugField()
    content_type = models.ForeignKey(ContentType)
    object_id = models.PositiveIntegerField()
    content_object = generic.GenericForeignKey()
}}}

* `bar` has a `Site` model:
{{{
from django.db import models

class Site(models.Model):
    name = models.CharField(...
    # ...
}}}
* Neither the admin nor sites Django apps are being used.

This causes the user's Site model to be overridden and masked by Django sites framework's one.

This is because the `django/contrib/contenttypes/generic.py` module contain both the definitions of the model-related generic stuff (!GenericForeignKey, etc.) AND the admin app-related specialized inlines (!GenericInlineModelAdmin, !GenericStackedInline, !GenericTabularInline.)

Maybe it's time we move the latter ones from `django.contrib.contenttypes.generic` to, say, a new `generic_admin` (or `admin_tools`?) on `django.contrib.contenttypes`?. Of course this would need a deprecation process.
"	Cleanup/optimization	assigned	contrib.contenttypes	dev	Normal		dependency generic contenttypes		Accepted	0	0	0	0	0	0
