Skip to content

Commit 9d4fbdd

Browse files
author
Richard Jones
committed
fix "Adding a new constrained field to the classic schema" example in docs
[SF#1433118]
1 parent cee2a43 commit 9d4fbdd

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Fixed:
1818
- fix "All users may only view and edit issues, files and messages they
1919
create" example in docs (sf bug 1439086)
2020
- fix saving of queries (sf bug 1436169)
21+
- fix "Adding a new constrained field to the classic schema" example in docs
22+
(sf bug 1433118)
2123

2224

2325
2006-02-10 1.1.0

doc/customizing.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.194 $
5+
:Version: $Revision: 1.195 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -2920,27 +2920,25 @@ If you haven't initialised the database with the ``roundup-admin``
29202920
Add::
29212921

29222922
category = db.getclass('category')
2923-
category.create(name="scipy", order="1")
2924-
category.create(name="chaco", order="2")
2925-
category.create(name="weave", order="3")
2923+
category.create(name="scipy")
2924+
category.create(name="chaco")
2925+
category.create(name="weave")
29262926

29272927
If the database has already been initalised, then you need to use the
29282928
``roundup-admin`` tool::
29292929

29302930
% roundup-admin -i <tracker home>
29312931
Roundup <version> ready for input.
29322932
Type "help" for help.
2933-
roundup> create category name=scipy order=1
2933+
roundup> create category name=scipy
29342934
1
2935-
roundup> create category name=chaco order=1
2935+
roundup> create category name=chaco
29362936
2
2937-
roundup> create category name=weave order=1
2937+
roundup> create category name=weave
29382938
3
29392939
roundup> exit...
29402940
There are unsaved changes. Commit them (y/N)? y
29412941

2942-
TODO: explain why order=1 in each case.
2943-
29442942

29452943
Setting up security on the new objects
29462944
::::::::::::::::::::::::::::::::::::::
@@ -3148,8 +3146,10 @@ table to lay things out. It doesn't matter where in the table we add new
31483146
stuff, it is entirely up to your sense of aesthetics::
31493147

31503148
<th>Category</th>
3151-
<td><span tal:replace="structure context/category/field" />
3152-
<span tal:replace="structure db/category/classhelp" />
3149+
<td>
3150+
<span tal:replace="structure context/category/field" />
3151+
<span tal:replace="structure python:db.category.classhelp('name',
3152+
property='category', width='200')" />
31533153
</td>
31543154

31553155
First, we define a nice header so that the user knows what the next

roundup/cgi/templating.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,8 @@ def classhelp(self, properties=None, label=''"(list)", width='500',
687687
filter = ''
688688
help_url = "%s?@startwith=0&amp;@template=help&amp;"\
689689
"properties=%s%s%s%s%s&amp;@pagesize=%s%s" % \
690-
(self.classname, properties, property, form, type, sort, pagesize, filter)
690+
(self.classname, properties, property, form, type,
691+
sort, pagesize, filter)
691692
onclick = "javascript:help_window('%s', '%s', '%s');return false;" % \
692693
(help_url, width, height)
693694
return '<a class="classhelp" href="%s" onclick="%s">%s</a>' % \

0 commit comments

Comments
 (0)