Defining Django App Dependencies

From Littledamien Wiki
Revision as of 18:15, 7 February 2016 by Video8 (talk | contribs)
Jump to navigation Jump to search

Overview

There are two files that control app dependencies: setup.py and requirements.txt.

setup.py is a list of "abstract" dependencies without a specification as to their source.

requirements.txt is more specific about source and version number.[1]

Packaging dependencies

In the project's root directory:

$ pip freeze > requirements.txt

pip freeze will list everything installed via pip in an environment. Some of these thing will not be requirements of the web app, and should be removed from requirements.txt.

Installing dependences

$ pip install -r requirements.txt

Notes

See also

References