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: “Since we have specified the DemoViewVersion
class, this view would only allow the v1
, v2
, and v3
versions in the URL path; any other version in the path would get a 404
response.”
A block of code is set as follows:
urlpatterns = [ ... path('apiview-class/', views.DemoAPIView.as_view()) ]
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
urlpatterns = [ path('hello-world/', views.hello_world), path('demo-version/', views.demo_version), path('custom-version/', views.DemoView.as_view()), path('another-custom-version/', views.AnotherView.as_view()) ]
Any command-line input or output is written as follows:
celery –-app=config beat -–loglevel=INFO
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: “Click on the Create New Instance button.”
Tips or important notes
Appear like this.