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 23444 Deprecate django.contrib.admin.helpers.InlineAdminForm.original_content_type_id ILYA nobody "First of all it must be said that at the moment django does not create ContentType objects for `through` models. Moreover, django suggests to remove such objects when trying to syncdb/migrate apps. But if you try to use your `through` model in inlines django will create ContentType object for it. Consider the example. Every time you visit `A` or `B` admin pages ContentType is created. {{{ #!python # models.py class A(models.Model): items = models.ManyToManyField('B') class B(models.Model): pass # admin.py class Inline(admin.TabularInline): model = A.items.through class A_Admin(admin.ModelAdmin): exclude = ('items',) inlines = (Inline,) class B_Admin(admin.ModelAdmin): inlines = (Inline,) }}} The problem is here: https://github.com/django/django/blob/stable/1.7.x/django/contrib/admin/helpers.py#L274 But the thing is that `original_content_type_id` is not used anywhere in 1.7 anymore. I've checked it by `grep`ing through all sources. It was used in 1.6 and lower to show ""View on site"" links: https://github.com/django/django/blob/stable/1.6.x/django/contrib/admin/templates/admin/edit_inline/tabular.html#L30 Now this part of template is refactored (while legacy view part remained): https://github.com/django/django/blob/stable/1.7.x/django/contrib/admin/templates/admin/edit_inline/tabular.html#L30 It can be solved easily by removing several legacy lines. If I didn't miss something I can make PR with that change." Cleanup/optimization closed contrib.admin dev Normal fixed Ready for checkin 1 0 0 0 0 0