I am trying to make a wall in Django and I have reached an important design decision.
I have the following classes:
WallPost, UserProfile, Group, Event
The issue is that I have Users profiles, events and groups that all will have walls which can be posted to. Hence I can't make a foreign key relations from user who posted to the model which is being posted to because there are multiple models that could be posted(unless I use a generic key but I feel there must be some enclosure for all the wallposts like a wall object).
I then thought of having an intermediate type of object like a wall which the wallposts would ForeignKey to and then then the User Group and Event would foreignkey to a wall. This also seems inefficient to me because the wall doesn't have anything to store and would just be more of a enclosure object.
What is best practice when using ForeignKeys and ManyToManyFields and GenericForeignKeys in django? As in how do you tell which way the relationship should go?
Thanks for all the input.