comparison doc/customizing.txt @ 2921:ad4fb8a14a97

more doc updates, not so many TODOs any more
author Richard Jones <richard@users.sourceforge.net>
date Thu, 18 Nov 2004 05:05:25 +0000
parents 7d97c75e7cba
children 1ae91c2fa5fe
comparison
equal deleted inserted replaced
2920:98e6219ddb83 2921:ad4fb8a14a97
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.157 $ 5 :Version: $Revision: 1.158 $
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::
37 Trackers have the following structure: 37 Trackers have the following structure:
38 38
39 =================== ======================================================== 39 =================== ========================================================
40 Tracker File Description 40 Tracker File Description
41 =================== ======================================================== 41 =================== ========================================================
42 config.py Holds the basic `tracker configuration`_ 42 config.ini Holds the basic `tracker configuration`_
43 dbinit.py Holds the `tracker schema`_ 43 schema.py Holds the `tracker schema`_
44 interfaces.py Defines the Web and E-Mail interfaces for the tracker 44 initial_data.py Holds any data to be entered into the database when the
45 select_db.py Selects the database back-end for the tracker 45 tracker is initialised.
46 db/ Holds the tracker's database 46 db/ Holds the tracker's database
47 db/files/ Holds the tracker's upload files and messages 47 db/files/ Holds the tracker's upload files and messages
48 db/backend_name Names the database back-end for the tracker
48 detectors/ Auditors and reactors for this tracker 49 detectors/ Auditors and reactors for this tracker
50 extensions/ Additional web actions and templating utilities.
49 html/ Web interface templates, images and style sheets 51 html/ Web interface templates, images and style sheets
50 =================== ======================================================== 52 =================== ========================================================
51 53
52 Tracker Configuration 54 Tracker Configuration
53 ===================== 55 =====================
1220 1222
1221 Default templates 1223 Default templates
1222 ----------------- 1224 -----------------
1223 1225
1224 The default templates are html4 compliant. If you wish to change them to be 1226 The default templates are html4 compliant. If you wish to change them to be
1225 xhtml compliant, you'll need to change the ``HTML_VERSION`` configuration 1227 xhtml compliant, you'll need to change the ``html_version`` configuration
1226 variable in ``config.py`` to ``'xhtml'`` instead of ``'html4'``. 1228 variable in ``config.ini`` to ``'xhtml'`` instead of ``'html4'``.
1227 1229
1228 Most customisation of the web view can be done by modifying the 1230 Most customisation of the web view can be done by modifying the
1229 templates in the tracker ``'html'`` directory. There are several types 1231 templates in the tracker ``'html'`` directory. There are several types
1230 of files in there. The *minimal* template includes: 1232 of files in there. The *minimal* template includes:
1231 1233
1532 - *user*, the current user item as an HTMLItem instance 1534 - *user*, the current user item as an HTMLItem instance
1533 - *form* 1535 - *form*
1534 The current CGI form information as a mapping of form argument name 1536 The current CGI form information as a mapping of form argument name
1535 to value 1537 to value
1536 **config** 1538 **config**
1537 This variable holds all the values defined in the tracker config.py 1539 This variable holds all the values defined in the tracker config.ini
1538 file (eg. TRACKER_NAME, etc.) 1540 file (eg. TRACKER_NAME, etc.)
1539 **db** 1541 **db**
1540 The current database, used to access arbitrary database items. 1542 The current database, used to access arbitrary database items.
1541 **templates** 1543 **templates**
1542 Access to all the tracker templates by name. Used mainly in 1544 Access to all the tracker templates by name. Used mainly in
3832 db.security.addPermissionToRole('Provisional User', p) 3834 db.security.addPermissionToRole('Provisional User', p)
3833 p = db.security.getPermission('Email Access') 3835 p = db.security.getPermission('Email Access')
3834 db.security.addPermissionToRole('Provisional User', p) 3836 db.security.addPermissionToRole('Provisional User', p)
3835 3837
3836 3838
3837 Then in the ``config.py`` we change the Role assigned to newly-registered 3839 Then in the ``config.ini`` we change the Role assigned to newly-registered
3838 users, replacing the existing ``'User'`` values:: 3840 users, replacing the existing ``'User'`` values::
3839 3841
3840 NEW_WEB_USER_ROLES = 'Provisional User' 3842 [main]
3841 NEW_EMAIL_USER_ROLES = 'Provisional User' 3843 ...
3844 new_web_user_roles = 'Provisional User'
3845 new_email_user_roles = 'Provisional User'
3842 3846
3843 Finally we add a new *auditor* to the ``detectors`` directory called 3847 Finally we add a new *auditor* to the ``detectors`` directory called
3844 ``provisional_user_auditor.py``:: 3848 ``provisional_user_auditor.py``::
3845 3849
3846 def audit_provisionaluser(db, cl, nodeid, newvalues): 3850 def audit_provisionaluser(db, cl, nodeid, newvalues):

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