Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “In the preceding code, first, the instance folder is loaded from the given path; then, the configuration file is loaded from the config.cfg file in the given instance folder.”
A block of code is set as follows:
PRODUCTS = { 'iphone': { 'name': 'iPhone 5S', 'category': 'Phones', 'price': 699, },
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
from flask_wtf.file import FileField, FileRequired class Product(db.Model): image_path = db.Column(db.String(255)) def __init__(self, name, price, category, image_path): self.image_path = image_path
Any command-line input or output is written as follows:
$ sudo apt update $ sudo apt install python3-dev $ sudo apt install apache2 apache2-dev
Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “It can also handle the Remember me feature, account recovery features, and so on.”
Tips or important notes
Appear like this.