When you create the Python modules, it is good practice to stay consistent with the structure in the files. This makes it easier for both you and other developers to read the code. This recipe will show you how to structure your imports.
Respecting the import order in Python files
Getting ready
Create a virtual environment and create a Django project in it.
How to do it...
Use the following structure for each Python file that you are creating. Categorize the imports into sections, as follows:
# System libraries
import os
import re
from datetime import datetime
# Third-party...