I have two classes, one of which is descended from the other, and I would like to make them both sibling classes descended from the same base class.
Before:
If base
will not be instantiated on its own, you can easily solve the problem using abstract = True
prop to class Meta
.
Example code:
from django.db import models
class Base(models.Model):
name = models.CharField(max_length=10)
class Meta:
abstract = True
class A(Base):
pass
class B(Base):
title = models.CharField(max_length=10)