comparison doc/customizing.txt @ 3582:026adc5f1e13

fix "Adding a new constrained field to the classic schema" example in docs [SF#1433118]
author Richard Jones <richard@users.sourceforge.net>
date Fri, 03 Mar 2006 00:11:31 +0000
parents 5c26b9bbd31a
children 394a69d73b53
comparison
equal deleted inserted replaced
3581:d10008f756a4 3582:026adc5f1e13
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.194 $ 5 :Version: $Revision: 1.195 $
6 6
7 .. This document borrows from the ZopeBook section on ZPT. The original is at: 7 .. This document borrows from the ZopeBook section on ZPT. The original is at:
8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx 8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
9 9
10 .. contents:: 10 .. contents::
2918 # haven't initialised the database with the admin "initialise" command 2918 # haven't initialised the database with the admin "initialise" command
2919 2919
2920 Add:: 2920 Add::
2921 2921
2922 category = db.getclass('category') 2922 category = db.getclass('category')
2923 category.create(name="scipy", order="1") 2923 category.create(name="scipy")
2924 category.create(name="chaco", order="2") 2924 category.create(name="chaco")
2925 category.create(name="weave", order="3") 2925 category.create(name="weave")
2926 2926
2927 If the database has already been initalised, then you need to use the 2927 If the database has already been initalised, then you need to use the
2928 ``roundup-admin`` tool:: 2928 ``roundup-admin`` tool::
2929 2929
2930 % roundup-admin -i <tracker home> 2930 % roundup-admin -i <tracker home>
2931 Roundup <version> ready for input. 2931 Roundup <version> ready for input.
2932 Type "help" for help. 2932 Type "help" for help.
2933 roundup> create category name=scipy order=1 2933 roundup> create category name=scipy
2934 1 2934 1
2935 roundup> create category name=chaco order=1 2935 roundup> create category name=chaco
2936 2 2936 2
2937 roundup> create category name=weave order=1 2937 roundup> create category name=weave
2938 3 2938 3
2939 roundup> exit... 2939 roundup> exit...
2940 There are unsaved changes. Commit them (y/N)? y 2940 There are unsaved changes. Commit them (y/N)? y
2941
2942 TODO: explain why order=1 in each case.
2943 2941
2944 2942
2945 Setting up security on the new objects 2943 Setting up security on the new objects
2946 :::::::::::::::::::::::::::::::::::::: 2944 ::::::::::::::::::::::::::::::::::::::
2947 2945
3146 Just like ``category.issue.html``, this file defines a form which has a 3144 Just like ``category.issue.html``, this file defines a form which has a
3147 table to lay things out. It doesn't matter where in the table we add new 3145 table to lay things out. It doesn't matter where in the table we add new
3148 stuff, it is entirely up to your sense of aesthetics:: 3146 stuff, it is entirely up to your sense of aesthetics::
3149 3147
3150 <th>Category</th> 3148 <th>Category</th>
3151 <td><span tal:replace="structure context/category/field" /> 3149 <td>
3152 <span tal:replace="structure db/category/classhelp" /> 3150 <span tal:replace="structure context/category/field" />
3151 <span tal:replace="structure python:db.category.classhelp('name',
3152 property='category', width='200')" />
3153 </td> 3153 </td>
3154 3154
3155 First, we define a nice header so that the user knows what the next 3155 First, we define a nice header so that the user knows what the next
3156 section is, then the middle line does what we are most interested in. 3156 section is, then the middle line does what we are most interested in.
3157 This ``context/category/field`` gets replaced by a field which contains 3157 This ``context/category/field`` gets replaced by a field which contains

Roundup Issue Tracker: http://roundup-tracker.org/