Skip to content

Commit b12a4cb

Browse files
author
Richard Jones
committed
documentation updates
1 parent 6122c80 commit b12a4cb

File tree

4 files changed

+95
-13
lines changed

4 files changed

+95
-13
lines changed

doc/customizing.txt

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

5-
:Version: $Revision: 1.150 $
5+
:Version: $Revision: 1.151 $
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
@@ -2039,10 +2039,8 @@ html_quote quote some text as safe in HTML (ie. <, >, ...)
20392039
=============== ========================================================
20402040

20412041
You may add additional utility methods by writing them in your tracker
2042-
``interfaces.py`` module's ``TemplatingUtils`` class. See `adding a time
2043-
log to your issues`_ for an example. The TemplatingUtils class itself
2044-
will have a single attribute, ``client``, which may be used to access
2045-
the ``client.db`` when you need to perform arbitrary database queries.
2042+
``extensions`` directory and registering them with the templating system.
2043+
20462044

20472045
Batching
20482046
::::::::
@@ -2418,6 +2416,9 @@ It may then:
24182416
Register the action class
24192417
~~~~~~~~~~~~~~~~~~~~~~~~~~
24202418

2419+
XXX update for new extensions setup (then search for interfaces.py and make
2420+
sure there's no examples that use the old style)
2421+
24212422
The class is now written, but isn't available to the user until you add it to
24222423
the ``instance.Client`` class ``actions`` variable, like so::
24232424

@@ -2942,6 +2943,8 @@ be able to give a summary of the total time spent on a particular issue.
29422943
perform such calculations. We do this by adding a method to the
29432944
TemplatingUtils class in our tracker ``interfaces.py`` module::
29442945

2946+
XXX update this example for TemplatingUtils -> extensions
2947+
29452948
class TemplatingUtils:
29462949
''' Methods implemented on this class will be available to HTML
29472950
templates through the 'utils' variable.

doc/upgrading.txt

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Migrating from 0.7.1 to 0.8.0
2020
---------------------
2121

2222
Backends 'bsddb' and 'bsddb3' are removed. If you are using one of these,
23-
please migrate to another backend before upgrade.
23+
you *must* migrate to another backend before upgrading.
24+
2425

2526
0.8.0 API changes
2627
-----------------
@@ -34,6 +35,53 @@ Class.get() instead.
3435

3536
XXX describe any mandatory changes to tracker layout
3637

38+
The ``config.py`` file has been replaced by ``config.ini``. You may copy
39+
the example config.ini from the classic tracker template::
40+
41+
templates/classic/config.ini
42+
43+
and modify the values therein based on the contents of your old config.py.
44+
In most cases, the names of the config variables are the same.
45+
46+
The ``select_db.py`` file has been replaced by a file in the ``db``
47+
directory called ``backend_name``. As you might guess, this file contains
48+
just the name of the backend. To figure what the contents of yours should
49+
be, use the following table:
50+
51+
================================ =========================
52+
``select_db.py`` contents ``backend_name`` contents
53+
================================ =========================
54+
from back_anydbm import ... anydbm
55+
from back_metakit import ... metakit
56+
from back_sqlite import ... sqlite
57+
from back_mysql import ... mysql
58+
from back_postgresql import ... postgresql
59+
================================ =========================
60+
61+
The ``dbinit.py`` file has been split into two new files,
62+
``initial_data.py`` and ``schema.py``. The contents of this file are:
63+
64+
``initial_data.py``
65+
You don't need on of these as your tracker is already initialised.
66+
67+
``schema.py``
68+
The contents of the ``def open(name=None):`` function go in this file.
69+
70+
Copy the lines of that function (down to the next ``def`` statement) from
71+
the ``dbinit.py`` file and *remove* the leading four spaces on each line
72+
(if there's 8 leading spaces, only remove 4).
73+
74+
Remove the first few lines - those starting with ``from roundup.hyperdb
75+
import ...`` and the ``db = Database(config, name)`` line.
76+
77+
Remove the last few lines starting with ``import detectors`` down to
78+
``return db`` inclusive.
79+
80+
Note that there's a new way to write extension code for Roundup - the old
81+
``interfaces.py`` file will be ignored in future versions of Roundup. See
82+
the `what's new in 0.8`__ documentation for more information.
83+
84+
__ whatsnew-0.8.html
3785

3886
0.8.0 8-bit character set support
3987
---------------------------------
@@ -47,20 +95,18 @@ characters in form fields). This version allows to change
4795
the character set for http transfers. To do so, you may add
4896
the following code to your ``page.html`` template::
4997

50-
<div tal:define="uri string:${request/base}${request/env/PATH_INFO}"
51-
tal:omit-tag="python:1"
52-
>
98+
<tal:block define="uri string:${request/base}${request/env/PATH_INFO}">
5399
<a tal:attributes="href python:request.indexargs_href(uri,
54100
{'@charset':'utf-8'})">utf-8</a>
55101
<a tal:attributes="href python:request.indexargs_href(uri,
56102
{'@charset':'koi8-r'})">koi8-r</a>
57-
</div>
103+
</tal:block>
58104

59105
(substitute ``koi8-r`` with appropriate charset for your language).
60106
Charset preference is kept in the browser cookie ``roundup_charset``.
61107

62108
Lines ``meta http-equiv`` added to the tracker templates in version 0.6.0
63-
are misleading and should be changed to include actual character set name::
109+
should be changed to include actual character set name::
64110

65111
<meta http-equiv="Content-Type"
66112
tal:attributes="content string:text/html;; charset=${request/client/charset}"

doc/whatsnew-0.8.txt

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,39 @@ __ features.html
1212
Logging of internal messages
1313
============================
1414

15-
TODO
15+
16+
Security Changes
17+
================
18+
19+
Added MD5 scheme for password hiding. This extends the existing SHA and
20+
crypt methods and is useful if you have an existing MD5 password database.
21+
22+
23+
Extending Roundup
24+
=================
25+
26+
To write extension code for Roundup you place a file in the tracker home
27+
``extensions`` directory. See the `customisation documentation`_ for more
28+
information about how this is done.
29+
30+
31+
Added support for HTTP charset selection
32+
========================================
33+
34+
XXX This doesn't appear in the main documentation
35+
36+
This is used to override the UTF-8 default. It may be overridden in both
37+
forms and a browser cookie.
38+
39+
- In forms, use the ``@charset`` variable.
40+
- To use the cookie override, have the ``roundup_charset`` cookie set.
41+
42+
In both cases, the value is a valid charset name (eg. ``utf-8`` or
43+
``kio8-r``).
44+
45+
46+
Web Interface Miscellanea
47+
=========================
1648

1749

1850
.. _`customisation documentation`: customizing.html

roundup/cgi/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.196 2004-11-05 04:55:52 richard Exp $
1+
# $Id: client.py,v 1.197 2004-11-08 23:29:45 richard Exp $
22

33
"""WWW request handler (also used in the stand-alone server).
44
"""
@@ -314,6 +314,7 @@ def determine_charset(self):
314314
"""
315315
# default to storage charset
316316
self.charset = self.STORAGE_CHARSET
317+
317318
# look for client charset
318319
if self.form.has_key('@charset'):
319320
charset = self.form['@charset'].value

0 commit comments

Comments
 (0)