- Django 2 by Example
- Antonio Melé
- 176字
- 2021-06-25 21:18:57
Conventions used
There are a number of text conventions used throughout this book.
CodeInText: 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: "You can deactivate your environment at any time with the deactivate command."
A block of code is set as follows:
from django.contrib import admin
from .models import Post
admin.site.register(Post)
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog.apps.BlogConfig',
]
Any command-line input or output is written as follows:
$ python manage.py startapp blog
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Fill in the form and click on the SAVE button."
Warnings or important notes appear like this.
Tips and tricks appear like this.