Multiple Requirements Files


Hi everyone,

I have heard it is good practice to have two seperate requirements files, one for local development and one for production. This can be managed when it goes to heroku by having a requirements file in the root folder where heroku is looking for it, but this directs it to the production file by having the following within the contents:

-r requirements/requirements_production.txt

What are your thoughts on this?

Category: Django
Tutorial: Configure Project For Heroku
Asked at Oct. 11, 2018, 8:01 a.m. by Reeve

1 Answer


That makes no sense to me. The purpose of the requirements.txt file is to pass a list of installed packages from the development environment to the production server. With that being said having a requirements.txt for development would be silly.

The only reason I can think of this benefiting anyone is if you are working with a large team and you need to pass the development environment around and you are using a package that is only used in development which would probably be Django debug toolbar. Still more work then it would be worth.

Would I use this approach: No

If I was working with a large team would I use this approach: No

Hope this helps

 

 

Answered on: Oct. 11, 2018, 1:30 p.m.
Answered by: admin