官术网_书友最值得收藏!

Conventions used

There are a number of text conventions used throughout this book.

Code words in text, folder names, filenames, package names and user input are shown as follows: "The HttpResponse object gets rendered into a string."

A block of code is set as follows:

from django.db import models
class SuperHero(models.Model):
name = models.CharField(max_length=100)

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

name = request.GET['user'] 

sql = "SELECT email FROM users WHERE username = '{}';".format(name) 

Any command-line input or output is written as follows:

$ django-admin.py --version
1.6.1

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: "When the test harness fails with an error, such as Expected output X but got Y, you will change your test to expect Y."

Lines beginning with the dollar prompt ($ sign) are to be input at the shell (but skip the prompt itself). Remaining lines are the system output which might get trimmed using ellipsis () if it gets really long.

Each chapter (except the first) will have a story box styled as follows:

SuperBook Chapter Title

It was a dark and stormy night; silhouettes of the caped crusaders moved within the charred ruins of the vast Ricksonian Digital Library for Medieval Dark Arts. Picking up what looked like the half-melted shrapnel of a hard disk; Captain Obvious gritted his teeth and shouted, “We need backup!”

Story boxes are best read sequentially to follow the linear narrative.

Patterns described in this book are written in the format mentioned in section named Patterns in this book in Chapter 1, Django and Patterns.

Tips and best practices are styled in the following manner:

Best Practice:

Change your super suit every five years.

主站蜘蛛池模板: 昌黎县| 政和县| 延吉市| 汤原县| 英德市| 西吉县| 营口市| 桐梓县| 互助| 嘉善县| 荥阳市| 大新县| 保靖县| 拉萨市| 宜良县| 龙川县| 阳西县| 绩溪县| 灵宝市| 大姚县| 马边| 图木舒克市| 泸定县| 桃园市| 巴东县| 武威市| 浙江省| 松溪县| 泸溪县| 章丘市| 闵行区| 西青区| 大理市| 井研县| 民县| 池州市| 宜阳县| 临潭县| 平潭县| 额济纳旗| 龙游县|