[Fixed]-(admin.E301) 'app.model' has no GenericForeignKey

1👍

Your current model structure is such that you have zero or more holidaygroups under each Activity. If you are trying to store many Activities under one holidaygroup you should have the foreign key in your Activities model:

class holidaygroup(models.Model):
    ...

class Activities(models.Model):
    ...
    holiday_group = models.ForeignKey(holidaygroup)

This way you can have an Activities inline list under each holidaygroup.

👤Selcuk

Leave a comment