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: “The db.sqlite3 file is the default SQLite database file that Django uses for development purposes.”
A block of code is set as follows:
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
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 django.shortcuts import render def index(request): return render(request, 'home/index.html')
Any command-line input or output is written as follows:
python3 --version
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “For Windows, you must select the Add python.exe to PATH option.”
Tips or important notes
Appear like this.