レイアウトの設定

□未翻訳

□翻訳中

□翻訳完了(細田謙二)

■レビュー(中垣健志)

レイアウトの設定

"views/layout.html"を編集してデフォルトのレイアウトを設定することができます。しかし、HTMLを編集しなくても設定することができます。実際、"static/base.css"のスタイルシートは、よく文章化されていて、第5章において説明されています。HTMLを編集せずに、色、カラム数、サイズ、枠線、背景を変更することができます。メニュー、タイトル、サブタイトルを編集したい場合は、任意のモデルファイルでそれを行うことができます。雛形のアプリは、"models/menu.py"ファイルにおいて、以下のパラメータのデフォルト値を設定します:

You can configure the defaul layout by editing "views/layout.html" but you can also configure it without editing the HTML. In fact, the "static/base.css" stylesheet is well documented and described in Chapter 5. You can change color, columns, size, borders and background without editing the HTML. If you want to edit the menu, the title or the subtitle, you can do so in any model file. The scaffolding app, sets default values of these parameters in the file "models/menu.py":

1.

2.

3.

4.

5.

6.

response.title = request.application

response.subtitle = T('customize me!')

response.meta.author = 'you'

response.meta.description = 'describe your app'

response.meta.keywords = 'bla bla bla'

response.menu = [ [ 'Index', False, URL('index') ] ]