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

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 libraries
import boto
from PIL import Image

# Django modules
from django.db import models
from django.conf import settings

# Django apps
from cms.models import Page

# Current-app modules
from .models import NewsArticle
from . import app_settings