- Django 1.0 Website Development
- Ayman Hourieh
- 217字
- 2021-05-21 20:19:56
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".
推薦閱讀
- JasperReports for Java Developers
- VSTO 3.0 for Office 2007 Programming
- 3ds Max & Unreal Engine 4:VR三維建模技術(shù)實(shí)例教程(附VR模型)
- GlassFish Administration
- Django 1.0 Template Development
- 從零開(kāi)始:AutoCAD 2010中文版建筑制圖基礎(chǔ)培訓(xùn)教程(第2版)
- SolidWorks2016中文版從入門(mén)到精通/CAX工程應(yīng)用叢書(shū)
- CakePHP Application Development
- Photoshop+AE UI動(dòng)效設(shè)計(jì)從新手到高手
- Photoshop CC 2017 淘寶美工設(shè)計(jì)實(shí)例教程
- iOS智能手機(jī)APP界面設(shè)計(jì)實(shí)戰(zhàn)教程
- Photoshop圖像處理與制作
- MATLAB科研繪圖與學(xué)術(shù)圖表繪制從入門(mén)到精通
- Microsoft SharePoint 2010 End User Guide: Business Performance Enhancement
- jQuery UI Themes Beginner's Guide