Skip to content

Commit a2eeada

Browse files
author
Richard Jones
committed
more doc
1 parent 1f4a97f commit a2eeada

File tree

5 files changed

+207
-293
lines changed

5 files changed

+207
-293
lines changed

doc/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ all: ${COMPILED}
1212
%.html: %.txt
1313
${PYTHON} ${STXTOHTML} --report=warning -d $< $@
1414

15+
clean:
16+
rm -f ${COMPILED}

doc/customizing.txt

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

5-
:Version: $Revision: 1.23 $
5+
:Version: $Revision: 1.24 $
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
@@ -90,18 +90,6 @@ file is a Python module. The configuration variables available are:
9090
**ADMIN_EMAIL** - ``'roundup-admin@%s'%MAIL_DOMAIN``
9191
The email address that roundup will complain to if it runs into trouble.
9292

93-
**FILTER_POSITION** - ``'top'``, ``'bottom'`` or ``'top and bottom'``
94-
Where to place the web filtering HTML on the index page.
95-
96-
**ANONYMOUS_ACCESS** - ``'deny'`` or ``'allow'``
97-
Deny or allow anonymous access to the web interface.
98-
99-
**ANONYMOUS_REGISTER** - ``'deny'`` or ``'allow'``
100-
Deny or allow anonymous users to register through the web interface.
101-
102-
**ANONYMOUS_REGISTER_MAIL** - ``'deny'`` or ``'allow'``
103-
Deny or allow anonymous users to register through the mail interface.
104-
10593
**MESSAGES_TO_AUTHOR** - ``'yes'`` or``'no'``
10694
Send nosy messages to the author of the message.
10795

@@ -133,79 +121,6 @@ file is a Python module. The configuration variables available are:
133121
Default class to use in the mailgw if one isn't supplied in email
134122
subjects. To disable, comment out the variable below or leave it blank.
135123

136-
**HEADER_INDEX_LINKS** - ``['DEFAULT', 'UNASSIGNED', 'USER']``
137-
Define what index links are available in the header, and what their
138-
labels are. Each key is used to look up one of the index specifications
139-
below - so ``'DEFAULT'`` will use ``'DEFAULT_INDEX'``.
140-
141-
Example ``DEFAULT_INDEX``::
142-
143-
{
144-
'LABEL': 'All Issues',
145-
'CLASS': 'issue',
146-
'SORT': ['-activity'],
147-
'GROUP': ['priority'],
148-
'FILTER': ['status'],
149-
'COLUMNS': ['id','activity','title','creator','assignedto'],
150-
'FILTERSPEC': {
151-
'status': ['-1', '1', '2', '3', '4', '5', '6', '7'],
152-
},
153-
}
154-
155-
This defines one of the index links that appears in the
156-
``HEADER_INDEX_LINKS`` list.
157-
158-
**LABEL** - ``'All Issues'``
159-
The text that appears as the link label.
160-
**CLASS** - ``'issue'``
161-
The class to display the index for.
162-
**SORT** - ``['-activity']``
163-
Sort by prop name, optionally preceeded with '-' to give descending or
164-
nothing for ascending sorting.
165-
**GROUP** - ``['priority']``
166-
Group by prop name, optionally preceeded with '-' or to sort in descending
167-
or nothing for ascending order.
168-
**FILTER** - ``['status']``
169-
Selects which props should be displayed in the filter section.
170-
Default is all.
171-
**COLUMNS** - ``['id','activity','title','creator','assignedto']``
172-
Selects the columns that should be displayed. Default is all.
173-
**FILTERSPEC** - *a dictionary giving the filter specification*
174-
The ``FILTERSPEC`` gives the filtering arguments. This selects the values
175-
the item properties given by propname must have.
176-
177-
Where the ``FILTERSPEC`` value is ``'CURRENT USER'``, it will be replaced
178-
by the id of the logged-in user. For example::
179-
180-
'FILTERSPEC': {
181-
'status': ['-1', '1', '2', '3', '4', '5', '6', '7'],
182-
'assignedto': 'CURRENT USER',
183-
},
184-
185-
**HEADER_ADD_LINKS** - ``['issue']``
186-
List the classes that users are able to add items to.
187-
188-
**HEADER_SEARCH_LINKS** - ``['issue']``
189-
List the classes that users can search.
190-
191-
**SEARCH_FILTERS** - ``['ISSUE_FILTER', 'SUPPORT_FILTER']``
192-
List search filters per class. Like the INDEX entries above, each key is
193-
used to look up one of the filter specifications below - so ``'ISSUE'``
194-
will use ``'ISSUE_FILTER'``.
195-
196-
Example ``ISSUE_FILTER``::
197-
198-
ISSUE_FILTER = {
199-
'CLASS': 'issue',
200-
'FILTER': ['status', 'priority', 'assignedto', 'creator']
201-
}
202-
203-
**CLASS** - ``'issue'``
204-
The class that the search page is for.
205-
**FILTER** - ``['status', 'priority', 'assignedto', 'creator']``
206-
Selects which props should be displayed on the filter page. Default is
207-
all.
208-
209124
The default config.py is given below - as you
210125
can see, the MAIL_DOMAIN must be edited before any interaction with the
211126
tracker is attempted.::
@@ -219,10 +134,6 @@ tracker is attempted.::
219134
# The domain name used for email addresses.
220135
MAIL_DOMAIN = 'your.tracker.email.domain.example'
221136

222-
# the next two are only used for the standalone HTTP server.
223-
HTTP_HOST = ''
224-
HTTP_PORT = 9080
225-
226137
# This is the directory that the database is going to be stored in
227138
DATABASE = os.path.join(INSTANCE_HOME, 'db')
228139

@@ -244,18 +155,6 @@ tracker is attempted.::
244155
# Somewhere for roundup to log stuff internally sent to stdout or stderr
245156
LOG = os.path.join(INSTANCE_HOME, 'roundup.log')
246157

247-
# Where to place the web filtering HTML on the index page
248-
FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom'
249-
250-
# Deny or allow anonymous access to the web interface
251-
ANONYMOUS_ACCESS = 'deny' # either 'deny' or 'allow'
252-
253-
# Deny or allow anonymous users to register through the web interface
254-
ANONYMOUS_REGISTER = 'deny' # either 'deny' or 'allow'
255-
256-
# Deny or allow anonymous users to register through the mail interface
257-
ANONYMOUS_REGISTER_MAIL = 'deny' # either 'deny' or 'allow'
258-
259158
# Send nosy messages to the author of the message
260159
MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no'
261160

@@ -293,10 +192,15 @@ Note: if you modify the schema, you'll most likely need to edit the
293192
`web interface`_ HTML template files and `detectors`_ to reflect
294193
your changes.
295194

296-
A tracker schema defines what data is stored in the tracker's database. The
297-
two schemas shipped with Roundup turn it into a typical software bug tracker
298-
(the extended schema allowing for support issues as well as bugs). Schemas are
299-
defined using Python code. The "classic" schema looks like this::
195+
A tracker schema defines what data is stored in the tracker's database.
196+
The
197+
schemas shipped with Roundup turn it into a typical software bug tracker or
198+
help desk.
199+
200+
XXX make sure we ship the help desk
201+
202+
Schemas are defined using Python code in the ``dbinit.py`` module of your
203+
tracker. The "classic" schema looks like this::
300204

301205
pri = Class(db, "priority", name=String(), order=String())
302206
pri.setkey("name")
@@ -365,15 +269,15 @@ In the tracker above, we've defined 7 classes of information:
365269
Initially empty, will all files attached to issues.
366270

367271
issue
368-
Initially emtyp, this is where the issue information is stored.
272+
Initially empty, this is where the issue information is stored.
369273

370274
We define the "priority" and "status" classes to allow two things: reduction in
371275
the amount of information stored on the issue and more powerful, accurate
372276
searching of issues by priority and status. By only requiring a link on the
373277
issue (which is stored as a single number) we reduce the chance that someone
374278
mis-types a priority or status - or simply makes a new one up.
375279

376-
Class and Nodes
280+
Class and Items
377281
:::::::::::::::
378282

379283
A Class defines a particular class (or type) of data that will be stored in the
@@ -387,16 +291,19 @@ Properties
387291
::::::::::
388292

389293
A Class is comprised of one or more properties of the following types:
390-
* String properties are for storing arbitrary-length strings.
391-
* Password properties are for storing encoded arbitrary-length strings. The
392-
default encoding is defined on the roundup.password.Password class.
393-
* Date properties store date-and-time stamps. Their values are Timestamp
394-
objects.
395-
* A Link property refers to a single other item selected from a specified
396-
class. The class is part of the property; the value is an integer, the id
397-
of the chosen item.
398-
* A Multilink property refers to possibly many items in a specified class.
399-
The value is a list of integers.
294+
295+
* String properties are for storing arbitrary-length strings.
296+
* Password properties are for storing encoded arbitrary-length strings. The
297+
default encoding is defined on the roundup.password.Password class.
298+
* Date properties store date-and-time stamps. Their values are Timestamp
299+
objects.
300+
* Number properties store numeric values.
301+
* Boolean properties store on/off, yes/no, true/false values.
302+
* A Link property refers to a single other item selected from a specified
303+
class. The class is part of the property; the value is an integer, the id
304+
of the chosen item.
305+
* A Multilink property refers to possibly many items in a specified class.
306+
The value is a list of integers.
400307

401308
FileClass
402309
:::::::::
@@ -420,7 +327,7 @@ directory) handles this action. The superceder link indicates an issue which
420327
has superceded this one.
421328
They also have the dynamically generated "creation", "activity" and "creator"
422329
properties.
423-
The value of the "creation" property is the date when a item was created, and
330+
The value of the "creation" property is the date when an item was created, and
424331
the value of the "activity" property is the date when any property on the item
425332
was last edited (equivalently, these are the dates on the first and last
426333
records in the item's journal). The "creator" property holds a link to the user
@@ -447,7 +354,7 @@ Note, the same thing can be done in the web and e-mail interfaces.
447354
create(information)
448355
:::::::::::::::::::
449356

450-
Create a item in the database. This is generally used to create items in the
357+
Create an item in the database. This is generally used to create items in the
451358
"definitional" classes like "priority" and "status".
452359

453360

@@ -491,6 +398,8 @@ Sample additional detectors that have been found useful will appear in the
491398
created. The address is hard-coded into the detector, so edit it before you
492399
use it (look for the text '[email protected]') or you'll get email errors!
493400

401+
XXX give the example here.
402+
494403

495404
Database Content
496405
----------------
@@ -512,46 +421,31 @@ case though, so be careful to use the right one.
512421
Use the roundup-admin interface's create, set and retire methods to add,
513422
alter or remove items from the classes in question.
514423

424+
XXX example
515425

516426

517427
Web Interface
518428
-------------
519429

520-
The web interface works behind the cgi-bin/roundup.cgi or roundup-server
521-
scripts. In both cases, the scripts determine which tracker is being accessed
430+
The web is provided by the roundup.cgi.client module and is used by
431+
roundup.cgi, roundup-server and ZRoundup.
432+
In all cases, we determine which tracker is being accessed
522433
(the first part of the URL path inside the scope of the CGI handler) and pass
523-
control on to the tracker interfaces.Client class which handles the rest of
434+
control on to the tracker interfaces.Client class - which uses the Client class
435+
from roundup.cgi.client - which handles the rest of
524436
the access through its main() method. This means that you can do pretty much
525437
anything you want as a web interface to your tracker.
526438

527-
Figuring out what is displayed
528-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
439+
Repurcussions of changing the tracker schema
440+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
529441

530-
Most customisation of the web view can be done by modifying the templates in
531-
the tracker **html** directory. There are several types of files in there:
442+
If you choose to change the `tracker schema`_ you will need to ensure the web
443+
interface knows about it:
532444

533-
page
534-
defines the overall look of your tracker. When you
535-
view an issue, it appears inside this template. When you view an index, it
536-
also appears inside this template.
537-
home
538-
the default page displayed when no other page is indicated by the user
539-
home.classlist
540-
a special version of the default page that lists the classes in the tracker
541-
*classname*.item
542-
displays an item of the *classname* class
543-
*classname*.index
544-
displays a list of *classname* items
545-
*classname*.search
546-
displays a search page for *classname* items
547-
_generic.index
548-
used to display a list of items where there is no *classname*.index available
549-
_generic.help
550-
used to display a "class help" page where there is no *classname*.help
551-
user.register
552-
a special page just for the user class that renders the registration page
553-
style.css
554-
a static file that is served up as-is
445+
1. Index, item and search pages for the relevant classes may need to have
446+
properties added or removed,
447+
2. The "page" template may require links to be changed, as might the "home"
448+
page's content arguments.
555449

556450
How requests are processed
557451
~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -652,7 +546,7 @@ edit
652546
:file
653547
Create a file and attach it to the current item's
654548
"files" property. Attach the file to the message created from
655-
the __note if it's supplied.
549+
the :note if it's supplied.
656550
:required=property,property,...
657551
The named properties are required to be filled in the form.
658552

@@ -713,16 +607,34 @@ search
713607
Base behaviour is to check the user can view this class.
714608

715609

716-
Repurcussions of changing the tracker schema
717-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
610+
Default templates
611+
~~~~~~~~~~~~~~~~~
718612

719-
If you choose to change the `tracker schema`_ you will need to ensure the web
720-
interface knows about it:
613+
Most customisation of the web view can be done by modifying the templates in
614+
the tracker **html** directory. There are several types of files in there:
721615

722-
1. Index, item and search pages for the relevant classes may need to have
723-
properties added or removed,
724-
2. The "page" template may require links to be changed, as might the "home"
725-
page's content arguments.
616+
page
617+
defines the overall look of your tracker. When you
618+
view an issue, it appears inside this template. When you view an index, it
619+
also appears inside this template.
620+
home
621+
the default page displayed when no other page is indicated by the user
622+
home.classlist
623+
a special version of the default page that lists the classes in the tracker
624+
*classname*.item
625+
displays an item of the *classname* class
626+
*classname*.index
627+
displays a list of *classname* items
628+
*classname*.search
629+
displays a search page for *classname* items
630+
_generic.index
631+
used to display a list of items where there is no *classname*.index available
632+
_generic.help
633+
used to display a "class help" page where there is no *classname*.help
634+
user.register
635+
a special page just for the user class that renders the registration page
636+
style.css
637+
a static file that is served up as-is
726638

727639
Overall Look - "page" template
728640
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)