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

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "We can include other contexts through the use of the include directive."

A block of code will be set as follows:

{% extends "base.html" %}
{% block title %}User Registration{% endblock %}
{% block head %}User Registration{% endblock %}
{% block content %}
<form method="post" action=".">
  {{ form.as_p }}
  <input type="submit" value="register" />
</form>
{% endblock %}

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

import os
from django.conf.urls.defaults import *
from bookmarks.views import *

site_media = os.path.join(
 os.path.dirname(__file__), 'site_media'
)

urlpatterns = patterns('',
  (r'^$', main_page),
  (r'^user/(\w+)/$', user_page),
  (r'^login/$', 'django.contrib.auth.views.login'),
  (r'^logout/$', logout_page),
 (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
 {'document_root': site_media}),
)

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

$ django-admin.py startproject django_bookmarks

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "clicking the Next button moves you to the next screen".

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

主站蜘蛛池模板: 红原县| 云阳县| 克拉玛依市| 松江区| 肇源县| 博兴县| 阿坝| 武冈市| 阳信县| 讷河市| 尉犁县| 府谷县| 眉山市| 友谊县| 陆良县| 永寿县| 昌图县| 荥经县| 永德县| 游戏| 文登市| 两当县| 邹城市| 方正县| 宣恩县| 徐闻县| 高州市| 邓州市| 林甸县| 平江县| 张北县| 巢湖市| 静海县| 肥城市| 达拉特旗| 玛纳斯县| 鄂托克旗| 镇坪县| 京山县| 乌海市| 南平市|