Django 2 Web Development Cookbook
上QQ阅读APP看书,第一时间看更新

There's more...

With a Docker project, there is significantly more control of the libraries and apps that are installed within the container:

  • For Python libraries needed for the project, we can use version specifications in the requirements.txt file to require a version known to be compatible. Furthermore, it was demonstrated in the Handling project dependencies with pip recipe that we can differentiate these requirements by environment, as well as being so precise as to require an exact repository version using the -e flag.
  • All Django applications are stored under the apps directory. Here would reside not only the code for ones specifically under development, but also any external apps that are not made available globally via the requirements.txt dependency list.