In my Django application I am working with calendars. For my purposes I have to use the classes Event
and Occurrence
of the module Django-Scheduler but adding new fields. I would like to know how to inherit from those classes to build my own models and add more fields in addition to those brought by parent classes.
I tried to do this in my models.py file:
from schedule.models import Event, Occurrence
class Evento(Event):
evento_padre = models.ForeignKey('self', on_delete=models.CASCADE)
class Ocurrencia(Occurrence):
plan = models.ManyToManyField(Plan)
But when I run the manage.py makemigrations I get this error:
SystemCheckError: System check identified some issues:
ERRORS:
calendar.Event.event_ptr: (fields.E300) Field defines a relation with model 'Event', which is either not installed, or is abstract.
calendar.Occurrence.occurrence_ptr: (fields.E300) Field defines a relationship with model 'Occurrence', which is either not installed, or is abstract.