https://static.djangoproject.com/img/logos/django-logo-negative.png

[Django Tutorial] Create requirements.txt file with pip freeze

In the earlier post we installed our first django framework project and installed bunch of modules one after another. The modules can be changed, obsolete or the support can be outdated. While deploying the project to production or any other environment we need an idea of the packages installed in the project. Therefore we need to store the python modules names as a requirement.

This blog is a part of Django Tutorial Series

This is why we are adding a requirements.txt file. This is an easy task that can be accomplished by a single command:

pip freeze >> requirements.txt

This creates a text file requirements.txt including following modules which are installed on project.

dj-database-url==0.5.0
Django==2.2.3
django-crispy-forms==1.7.2
ez-setup==0.9
gunicorn==19.9.0
Pillow==6.1.0
pkg-resources==0.0.0
psycopg2-binary==2.8.3
pytz==2019.1
sqlparse==0.3.0

Next we will go through the creation of super user and making database migration.