Home

Django question of the day: two apps, relating them


Here’s a quick question to the Django people following my blog, and one I think will be a huge help to individuals attempting to perform something similar.

I’m currently working on a project that could make use of Nathan Borror’s excellent django-basic-places and django-basic-people applications.

I’m loving them so far, and getting a lot done. However, one thing that I would like to do is allow for a Person to be associated as an “owner” of a place. If I were writing all of these as a cohesive application, I would add an ForeignKey field to the Place model and link it up to the Person model.

Those apps, however, should be standalone and not linked and kept as generic as they are. So how can I link these two models in my project? Should I create some sort of intermediary model that relate the two? Is that too much of a hack?

Is there some mechanism I’m just plain overlooking?