#30273: ModelAdmin for proxy model with InlineModelAdmin for superclass reference results in admin.E202 -------------------------------------+------------------------------------- Reporter: | Owner: nobody jwindhager | Type: Bug | Status: new Component: | Version: 2.1 contrib.admin | Keywords: proxy, Severity: Normal | InlineModelAdmin, E202 Triage Stage: | Has patch: 0 Unreviewed | Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- Assume the following Django models:
{{{#!python class Reporter(models.Model): ... class Journalist(Reporter): ... class Meta: proxy = True class Article(models.Model): reporter = models.ForeignKey(Reporter) ... }}} Register model admins as follows (exemplary): {{{#!python class ArticleInline(admin.TabularInline): model = Article fk_name = 'reporter' ... @admin.register(Journalist) class JournalistAdmin(admin.ModelAdmin): inlines = [ArticleInline] ... }}} This will result in the following error: {{{ <class 'ArticleInline'>: (admin.E202) fk_name 'reporter' is not a ForeignKey to 'Journalist'. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/30273> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.4c86622dc16a5c45ebf674bf1fd92411%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.