2👍
✅
Your abstract base class should extend models.Model
:
class CalendarDisplay(models.Model):
...
Your child class should then only extend CalendarDisplay
– it doesn’t need to extend models.Model
:
class Reservation(CalendarDisplay):
...
Also, you need to either not override __init__
in CalendarDisplay
or you need to call super
in your init:
def __init__(self, *args, **kwargs):
super(CalendarDisplay, self).__init__(*args, **kwargs)
👤dgel
Source:stackexchange.com