Mercurial > p > roundup > code
comparison doc/upgrading.txt @ 2886:0998d1b48182
documentation updates
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 08 Nov 2004 23:29:45 +0000 |
| parents | 24a5447725a2 |
| children | accb3b411ef6 |
comparison
equal
deleted
inserted
replaced
| 2884:6d6fdd1daf92 | 2886:0998d1b48182 |
|---|---|
| 18 | 18 |
| 19 0.8.0 Backend changes | 19 0.8.0 Backend changes |
| 20 --------------------- | 20 --------------------- |
| 21 | 21 |
| 22 Backends 'bsddb' and 'bsddb3' are removed. If you are using one of these, | 22 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 | |
| 24 | 25 |
| 25 0.8.0 API changes | 26 0.8.0 API changes |
| 26 ----------------- | 27 ----------------- |
| 27 | 28 |
| 28 Class.safeget() was removed from the API. Test your item ids before calling | 29 Class.safeget() was removed from the API. Test your item ids before calling |
| 32 0.8.0 new tracker layout | 33 0.8.0 new tracker layout |
| 33 ------------------------ | 34 ------------------------ |
| 34 | 35 |
| 35 XXX describe any mandatory changes to tracker layout | 36 XXX describe any mandatory changes to tracker layout |
| 36 | 37 |
| 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 | |
| 37 | 85 |
| 38 0.8.0 8-bit character set support | 86 0.8.0 8-bit character set support |
| 39 --------------------------------- | 87 --------------------------------- |
| 40 | 88 |
| 41 Added support for custom encodings in http data. | 89 Added support for custom encodings in http data. |
| 45 utf8-encoded pages (e.g. Netscape Navigator 4 displays wrong | 93 utf8-encoded pages (e.g. Netscape Navigator 4 displays wrong |
| 46 characters in form fields). This version allows to change | 94 characters in form fields). This version allows to change |
| 47 the character set for http transfers. To do so, you may add | 95 the character set for http transfers. To do so, you may add |
| 48 the following code to your ``page.html`` template:: | 96 the following code to your ``page.html`` template:: |
| 49 | 97 |
| 50 <div tal:define="uri string:${request/base}${request/env/PATH_INFO}" | 98 <tal:block define="uri string:${request/base}${request/env/PATH_INFO}"> |
| 51 tal:omit-tag="python:1" | |
| 52 > | |
| 53 <a tal:attributes="href python:request.indexargs_href(uri, | 99 <a tal:attributes="href python:request.indexargs_href(uri, |
| 54 {'@charset':'utf-8'})">utf-8</a> | 100 {'@charset':'utf-8'})">utf-8</a> |
| 55 <a tal:attributes="href python:request.indexargs_href(uri, | 101 <a tal:attributes="href python:request.indexargs_href(uri, |
| 56 {'@charset':'koi8-r'})">koi8-r</a> | 102 {'@charset':'koi8-r'})">koi8-r</a> |
| 57 </div> | 103 </tal:block> |
| 58 | 104 |
| 59 (substitute ``koi8-r`` with appropriate charset for your language). | 105 (substitute ``koi8-r`` with appropriate charset for your language). |
| 60 Charset preference is kept in the browser cookie ``roundup_charset``. | 106 Charset preference is kept in the browser cookie ``roundup_charset``. |
| 61 | 107 |
| 62 Lines ``meta http-equiv`` added to the tracker templates in version 0.6.0 | 108 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:: |
| 64 | 110 |
| 65 <meta http-equiv="Content-Type" | 111 <meta http-equiv="Content-Type" |
| 66 tal:attributes="content string:text/html;; charset=${request/client/charset}" | 112 tal:attributes="content string:text/html;; charset=${request/client/charset}" |
| 67 /> | 113 /> |
| 68 | 114 |
