我有一个 Django 项目,它有多个设置文件(www 站点、移动站点、一个 API ..),我最近开始削减配置/部署以进行构建。不幸的是,我可以让 djangorecipe 为我生成单独的 WSGI 文件的唯一方法是将每个站点指定为自己的块,这会为每个站点创建一个完整的单独的 django 库。
我想这本身并不是一个真正的问题,解决方法是手动创建 WSGI 文件......但如果有一种方法可以通过构建来实现这一切并共享相同的 django lib,那将是理想的。
这是我现在拥有的,它创建了单独的 Django 安装:
[buildout]
parts =
python
web
mobile
<etc...>
[python]
recipe = zc.recipe.egg
eggs = <etc...>
[web]
recipe = djangorecipe
interpreter = python
version = trunk
project = proj
settings = web_settings
eggs = ${python:eggs}
wsgi = true
[mobile]
recipe = djangorecipe
interpreter = python
version = ${web:version}
project = ${web:project}
settings = mobile_settings
eggs = ${python:eggs}
wsgi = true
<etc...>