How can I have multiple Django projects in a single buildout repo?

Asked by Travis Jensen on 2013-03-12

This isn't so much a bug as a question of functionality. I have a project that I would like to break into effectively three sub-projects.

The projects are "shared", "ui" and "events". "shared", as its name implies, contains shared code like db models; "ui" contains the actual web application; and "events" contains processors for various events the rely on the "shared" db models. Because the whole point of "shared" is to share the Django models (and other utility-type code), it needs to be a basic Django application, as does "events" for the same reason.

So the question is, can I set each of them up with its own djangorecipe in some way or do I have to use zc.recipe.egg:custom and basically re-roll the djangorecipe stuff for "shared" and "events" (it seems like "ui" would make the most sense to leave as djangorecipe if I can only have one)?

I've tried a lot of different things, but the core problem I seem to hit is that I can only have one (afaik!), and so it can only find whichever project I include in that I was hoping I could get around the issue by passing environment variables that looks at to decide which project to actually install, but that has been a bust so far.


Question information

English Edit question
Django Recipe Edit question
No assignee Edit question
Solved by:
Travis Jensen
Last query:
Last reply:
Travis Jensen (travis-jensen) said : #1

To answer my own question: Buildout finds the files using the develop attribute of the buildout key, so instead of:

develop = .

make it:

develop = path/to/first path/to/second

Naturally, the packages and package_dir parameters of the setup() call must be updated accordingly.