The recommended way to do what you are after is:
class AbstractBase(models.Model):
f1 = models.IntegerField()
class Meta:
abstract = True
class Base(AbstractBase):
pass
class Derived(AbstractBase):
f2 = models.IntegerField()
If you can't use the above way, then the way forward would be something like:
class Base(models.Model):
f1 = models.IntegerField()
class Derived(make_abstract(Base)):
f2 = models.IntegerField()
It might be possible to create the make_abstract() method outside of
Django. If not, we might be able to improve internals so that
make_abstract() would be easy to write outside of Django.
I don't think we want this inbuilt, as the make_abstract() model
design is inferior to using real abstract model as base for both
models.
- Anssi
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
django-develop...@googlegroups.com.
> To post to this group, send email to
django-d...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-developers/62b0b093-c7e5-4abb-a797-63277b31d27c%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.