Requirements.txt File
Requirements are the list of Python packages (dependencies) your project is using while it runs, including the version for each package. It is important to update your requirements.txt file for collaborating properly with other developers. This file, when included in your code repository, enables you to update all the packages installed in your virtual environment by executing a single line in the terminal.
In order to generate a new requirements.txt file or update the existing one use this command. Make sure that you are in a correct directory.
(virtualenv) $ pip freeze > requirements.txt
It is a good practice to update the requirements.txt file before pushing code to the repository and install requirements.txt file after pulling code from the repository.
Best practices for Professional Developer – Django Framework
Django is an open-source, Python-based framework for building web applications. To make our Django code more readable and efficient we should follow a certain set of rules/practices. These should not be seen as the right way or the only way to work with Django, but instead best practices to work with Django framework