django_polymorphic icon indicating copy to clipboard operation
django_polymorphic copied to clipboard

Support single-table inheritance when no fields are defined on subclasses

Open craigds opened this issue 14 years ago • 2 comments

The idea is kind of like proxy models (and could be implemented as variation on proxy models I think.)

I explained this in this thread on django-developers

Joins are bad, so it seems logical to support this kind of thing.

I've come across a number of places where I've had to add if self.type == self.TYPE_FOO) logic to methods; it makes sense to handle this in a more OO way.

craigds avatar Mar 06 '11 23:03 craigds

I think this is a really good idea! And it looks like it could be implemented fairly easily.

julkiewicz avatar Apr 10 '11 21:04 julkiewicz

I added support for this in my fork: https://github.com/Kronuz/django_polymorphic/commit/e7d70a3616ed7ac753a6445af44b6e6ee37e674d

Kronuz avatar Nov 26 '11 06:11 Kronuz