[Answer]-Django Model Inheritance β€” prevent subclass instances from appearing in superclass admin

1πŸ‘

βœ…

This is normal behavior. From database point of view table primary key of PubMedArticle just refers to Article table. So for each record in PubMedArticle table must be a record in Article table.

Now to the admin. The are two ways:

1) Make Article model abstarct – a good idea if you dont need unique primary keys to all of your articles.
2) Customize django admin list query.

πŸ‘€singer

Leave a comment