Lukas Schönsgibl
Lukas Schönsgibl

Reputation: 326

Inheritance - Models.py from a installed GitHub-App

I've integrated Django-Scheduler into my project that has a events.py file that creates a "title" in the class "Event". I've added some other variables with Inheritance.For the next Step I need to change Title into a ForeignKey, thats why I've tried this little code:

from django.db import models
from schedule.models import Event

class LessonEvent(Event):

    title = models.ForeignKey(Student, on_delete=models.CASCADE)

Because of the Fact that the original class Event has not Abstract=True in the Meta Django gives me this Error:

lessons.LessonEvent.title: (models.E006) The field 'title' clashes with the field 'title' from model 'schedule.event'

Is there a way to solve this, without touching the code of the django-scheduler app?

Upvotes: 0

Views: 50

Answers (0)

Related Questions