You can cascade your requirements files and use the -r flag to tell pip to include the contents of one file in another. You can sort your requirements into hierarchies of hierarchical folders as follows:
`-- django_project_root |-- requirements | |-- common.txt | |-- dev.txt | `-- prod.txt `-- requirements.txt
The contents of the files will look like this:
common.txt:
dev.txt:
# Specifies only dev-specific requirements
prod.txt:
# Same for prod... -r common.txt prod_req==1.0 ...
Outside of Heroku, you can configure these environments:
pip install -r requirements/dev.txt
or
pip install -r requirements/prod.txt
Since Heroku looks specifically for "requirements.txt" at the root of the project, it should just display prod, for example:
requirements.txt:
Christian Abbott Dec 21 '13 at 14:30 2013-12-21 14:30
source share