August 2016
Beginner to intermediate
717 pages
15h 24m
English
When you create the Python modules, it is good practice to stay consistent with the structure in the files. This makes it easier for other developers and yourself to read the code. This recipe will show you how to structure your imports.
Create a virtual environment and a Django project in it.
Use the following structure in a Python file that you create. Just after the first line that defines UTF-8 as the default Python file encoding, put the imports categorized in sections, as follows:
# -*- coding: UTF-8 -*- # System libraries from __future__ import unicode_literals import os import re from datetime import datetime # Third-party libraries import boto from PIL import Image # Django ...
Read now
Unlock full access