0

We have a Django 1.10 project consisting of 7 apps (let's call them A-G). The project is actually three different servers consisting of different subsets of the apps like this: A+F, A+G, A+B+C+D+E.
F and G are not referencing or referenced by any other app except for A.

Is there a way to already group this on the Django project level? Maybe three projects, referencing apps from other projects? I could not find a way to do this without duplicating code.

Is there a nice way to only deploy the given subsets? We do have three different settings files for each subset, only including the wanted apps. But this wouldn't mean we only deploy the code for those apps of course. We may not deploy app D for example for the subset server A+F.

Sebastian
  • 5,177
  • 4
  • 30
  • 47

1 Answers1

0

Sounds like the right™ thing to do is to package each app {A,B,C,D,E,F,G} separately, i.e. a completely standalone version control repository, it's own setup.py and all, and then have each of your 3 'servers' be projects in their own right, each of which install the relevant dependencies from {A,B,C,D,E,F,G} and adds the relevant settings etc.

Yuval Adam
  • 161,610
  • 92
  • 305
  • 395
  • So you say I will have each app in its own VCS repository - but not as Django projects but directly as the apps, right? Could you elaborate on "install the relevant dependencies", please? I have never heard of this. – Sebastian Oct 05 '16 at 08:51
  • https://docs.djangoproject.com/en/1.10/intro/reusable-apps/ seems to be the place to go after googling for 'setup.py' – Sebastian Oct 05 '16 at 08:53