[Answered ]-Listing generic relations in Django

2πŸ‘

βœ…

If it’s a generic relation, there would be other models apart from Contact which would be related to this model as well. So, Unsubscribe would be also associated with other models.

What you want to do is specific to Contact, so I guess it should go in the views.py of contact app.
Also, conventionally it depends on what is the url you will be serving it from. If your url is something like /contacts/unsubscribed, it should be in contacts app.

But if you want to keep track of unsubscribed model objects at one place it could go in unsubscribe app. eg: Say you want to show unsubscribed contacts at /unsubscribed/contacts/ and want to show unsubscribed foos at /unsubscribed/foos/, then it should be in unsubscribe app.

So, depends a great deal on how your url structure should be and how you want to use it.

πŸ‘€Akshar Raaj

Leave a comment