{{{#!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.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/30273#comment:1>
* Attachment "test30273.zip" added.
DemoProject which actually works
* status: new => closed
* resolution: => worksforme
Comment:
This works for me. I attached a demo project, please have a look. Maybe I
did misunderstood you somehow. I tested with Django 2.1.7 and master.
--
Ticket URL: <https://code.djangoproject.com/ticket/30273#comment:2>