|
2 | 2 | Customising Roundup |
3 | 3 | =================== |
4 | 4 |
|
5 | | -:Version: $Revision: 1.51 $ |
| 5 | +:Version: $Revision: 1.52 $ |
6 | 6 |
|
7 | 7 | .. This document borrows from the ZopeBook section on ZPT. The original is at: |
8 | 8 | http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx |
@@ -52,18 +52,43 @@ html/ Web interface templates, images and style sheets |
52 | 52 | Tracker Configuration |
53 | 53 | ===================== |
54 | 54 |
|
55 | | -The config.py located in your tracker home contains the basic |
56 | | -configuration for the web and e-mail components of roundup's interfaces. This |
57 | | -file is a Python module. The configuration variables available are: |
| 55 | +The config.py located in your tracker home contains the basic configuration |
| 56 | +for the web and e-mail components of roundup's interfaces. As the name |
| 57 | +suggests, this file is a Python module. This means that any valid python |
| 58 | +expression may be used in the file. Mostly though, you'll be setting the |
| 59 | +configuration variables to string values. Python string values must be quoted |
| 60 | +with either single or double quotes:: |
| 61 | + |
| 62 | + 'this is a string' |
| 63 | + "this is also a string - use it when you have a 'single quote' in the value" |
| 64 | + this is not a string - it's not quoted |
| 65 | + |
| 66 | +Python strings may use formatting that's almost identical to C string |
| 67 | +formatting. The ``%`` operator is used to perform the formatting, like so:: |
| 68 | + |
| 69 | + 'roundup-admin@%s'%MAIL_DOMAIN |
| 70 | + |
| 71 | +this will create a string ``' [email protected]'`` if |
| 72 | +MAIL_DOMAIN is set to ``'tracker.domain.example'``. |
| 73 | + |
| 74 | +You'll also note some values are set to:: |
| 75 | + |
| 76 | + os.path.join(TRACKER_HOME, 'db') |
| 77 | + |
| 78 | +or similar. This creates a new string which holds the path to the "db" |
| 79 | +directory in the TRACKER_HOME directory. This is just a convenience so if the |
| 80 | +TRACKER_HOME changes you don't have to edit multiple valoues. |
| 81 | + |
| 82 | +The configuration variables available are: |
58 | 83 |
|
59 | 84 | **TRACKER_HOME** - ``os.path.split(__file__)[0]`` |
60 | 85 | The tracker home directory. The above default code will automatically |
61 | | - determine the tracker home for you. |
| 86 | + determine the tracker home for you, so you can just leave it alone. |
62 | 87 |
|
63 | 88 | **MAILHOST** - ``'localhost'`` |
64 | 89 | The SMTP mail host that roundup will use to send e-mail. |
65 | 90 |
|
66 | | -**MAIL_DOMAIN** - ``'your.tracker.email.domain.example'`` |
| 91 | +**MAIL_DOMAIN** - ``'tracker.domain.example'`` |
67 | 92 | The domain name used for email addresses. |
68 | 93 |
|
69 | 94 | **DATABASE** - ``os.path.join(TRACKER_HOME, 'db')`` |
@@ -1428,18 +1453,38 @@ by activity, arranged in descending order. The filter section shows filters for |
1428 | 1453 | the "status" and "topic" properties, and the table includes columns for the |
1429 | 1454 | "title", "status", and "fixer" properties. |
1430 | 1455 |
|
1431 | | -Filtering of indexes |
1432 | | -~~~~~~~~~~~~~~~~~~~~ |
1433 | | - |
1434 | | -TODO |
1435 | | - |
1436 | 1456 | Searching Views |
1437 | 1457 | --------------- |
1438 | 1458 |
|
1439 | 1459 | This is one of the class context views. The template used is typically |
1440 | | -"*classname*.search". |
| 1460 | +"*classname*.search". The form on this page should have "search" as its |
| 1461 | +``:action`` variable. The "search" action: |
| 1462 | + |
| 1463 | +- sets up additional filtering, as well as performing indexed text searching |
| 1464 | +- sets the ``:filter`` variable correctly |
| 1465 | +- saves the query off if ``:query_name`` is set. |
| 1466 | + |
| 1467 | +The searching page should lay out any fields that you wish to allow the user |
| 1468 | +to search one. If your schema contains a large number of properties, you |
| 1469 | +should be wary of making all of those properties available for searching, as |
| 1470 | +this can cause confusion. If the additional properties are Strings, consider |
| 1471 | +having their value indexed, and then they will be searchable using the full |
| 1472 | +text indexed search. This is both faster, and more useful for the end user. |
| 1473 | + |
| 1474 | +The two special form values on search pages which are handled by the "search" |
| 1475 | +action are: |
| 1476 | + |
| 1477 | +:search_text |
| 1478 | + Text to perform a search of the text index with. Results from that search |
| 1479 | + will be used to limit the results of other filters (using an intersection |
| 1480 | + operation) |
| 1481 | +:query_name |
| 1482 | + If supplied, the search parameters (including :search_text) will be saved |
| 1483 | + off as a the query item and registered against the user's queries property. |
| 1484 | + Note that the *classic* template schema has this ability, but the *minimal* |
| 1485 | + template schema does not. |
| 1486 | + |
1441 | 1487 |
|
1442 | | -TODO |
1443 | 1488 |
|
1444 | 1489 | Item Views |
1445 | 1490 | ---------- |
|
0 commit comments