Serdar T. wrote: > Is it better to create repositories at a site-, project- or app-level? > Technically, you can do all three.
Definitely put all of your re-usable apps into their own repository. I always put my projects into their own repository, but I don't necessarily include apps that I'm using in them that come from somewhere else. I do have a couple of repos that are just projects and have no apps in them. The apps are expected to be on the python path at runtime. There are a couple of times when you really don't need your app to be re-usable. It's fine to create a project and an app that will always and forever live in the same version controlled repo. Another common practice is to take advantage of version control systems features of being able to reference external repositories. svn has an "external" option, and git has something called submodules. I'm not super familiar with other version control systems, but I'm sure there are equivalents in most popular ones. Generally speaking, when you are writing an app, the repo should have a layout that looks something like this: /docs/ /appname/ /readme.txt /authors.txt /setup.py ...etc... This is a fairly common in practice. The idea is that a lot of those things don't belong in with your python code, so they live one level up. Django itself follows this convention, as do most python projects. When you want to track a whole site, you can add projects and/or apps as submodules/externals. Generally speaking, a single site could/should be a single Django project, and making this distinction doesn't come up terribly often in the configurations I've seen. Hopefully this was helpful and happy coding! Jeff Anderson
signature.asc
Description: OpenPGP digital signature