Django: Apps vs Projects

After 6 months using Django, I’m still not entirely comfortable with it’s separation between applications and projects. Apart from how to name the first application (“main”? “web”? “site”?), I frequently find myself wondering whether a particular piece of functionality does not warrant it’s own application.

So far, my rule of thumb has always been “only if it’s reusable in other projects” – basically, stuff like a forum, blog or wiki. As I’m about to start writing an API for critify, the issue comes up again. Create an “api” app? According to the above, the answer would be no, but I am hesitating. It would make sense, in a way. New models will be necessary. Doesn’t an api_keys table seem more “right” then one called site_apikeys?

Maybe a better rule would be: “if it needs it’s own models”.

2 thoughts on “Django: Apps vs Projects

  1. Simon,

    thanks for your comment. I had actually read both those posts, and I know that a “project” is really not much more than a settings file. My confusion has more to do with how to split functionality to across multiple applications – or not to.

    In the end, there’s probably not an easy answer. I hope that over time I’ll be able to better rely on my intuition.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s