Skip to content

Commit b28330a

Browse files
committed
Document Roundup URL design
1 parent c230617 commit b28330a

File tree

1 file changed

+45
-22
lines changed

1 file changed

+45
-22
lines changed

doc/customizing.txt

Lines changed: 45 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,34 +1287,59 @@ In some situations, exceptions occur:
12871287
client
12881288

12891289

1290+
Roundup URL design
1291+
------------------
1292+
1293+
Each tracker has several hardcoded URLs. These three are equivalent and
1294+
lead to the main tracker page:
1295+
1296+
1. ``/``
1297+
2. ``/index``
1298+
3. ``/home``
1299+
1300+
The following prefix is used to access static resources:
1301+
1302+
4. ``/@@file/``
1303+
1304+
All other URLs depend on the classes configured in Roundup database.
1305+
Each class receives two URLs - one for the class itself and another
1306+
for specific items of that class. Example for class URL:
1307+
1308+
5. ``/issue``
1309+
1310+
This is usually used to show listings of class items. The URL for
1311+
for specific object of issue class with id 1 will look like:
1312+
1313+
6. ``/issue1``
1314+
1315+
12901316
Determining web context
12911317
-----------------------
12921318

1293-
To determine the "context" of a request, we look at the URL and the
1294-
special request variable ``@template``. The URL path after the tracker
1295-
identifier is examined. Typical URL paths look like:
1319+
To determine the "context" of a request (what request is for), we look at
1320+
the URL path after the tracker root and at ``@template`` request
1321+
parameter. Typical URL paths look like:
12961322

12971323
1. ``/tracker/issue``
12981324
2. ``/tracker/issue1``
12991325
3. ``/tracker/@@file/style.css``
13001326
4. ``/cgi-bin/roundup.cgi/tracker/file1``
13011327
5. ``/cgi-bin/roundup.cgi/tracker/file1/kitten.png``
13021328

1303-
where the "tracker identifier" is "tracker" in the above cases. That means
1304-
we're looking at "issue", "issue1", "@@file/style.css", "file1" and
1305-
"file1/kitten.png" in the cases above. The path is generally only one
1306-
entry long - longer paths are handled differently.
1307-
1308-
a. if there is no path, then we are in the "home" context. See `the "home"
1309-
context`_ below for more information about how it may be used.
1310-
b. if the path starts with "@@file" (as in example 3,
1311-
"/tracker/@@file/style.css"), then the additional path entry,
1312-
"style.css" specifies the filename of a static file we're to serve up
1313-
from the tracker TEMPLATES (or STATIC_FILES, if configured) directory.
1314-
This is usually the tracker's "html" directory. Raises a SendStaticFile
1315-
exception.
1329+
where tracker root is ``/tracker/`` or ``/cgi-bin/roundup.cgi/tracker/``
1330+
We're looking at "issue", "issue1", "@@file/style.css", "file1" and
1331+
"file1/kitten.png" in the cases above.
1332+
1333+
a. with is no path we are in the "home" context. See `the "home"
1334+
context`_ below for details. "index" or "home" paths may also be used
1335+
to switch into "home" context.
1336+
b. for paths starting with "@@file" the additional path entry ("style.css"
1337+
in the example above) specifies the static file to be served
1338+
from the tracker TEMPLATES directory (or STATIC_FILES, if configured).
1339+
This is usually the tracker's "html" directory. Internally this works
1340+
by raising SendStaticFile exception.
13161341
c. if there is something in the path (as in example 1, "issue"), it
1317-
identifies the tracker class we're to display.
1342+
identifies the tracker class to display.
13181343
d. if the path is an item designator (as in examples 2 and 4, "issue1"
13191344
and "file1"), then we're to display a specific item.
13201345
e. if the path starts with an item designator and is longer than one
@@ -1324,11 +1349,9 @@ e. if the path starts with an item designator and is longer than one
13241349
with (i.e. "file1/kitten.png" is nicer to download than "file1").
13251350
This raises a ``SendFile`` exception.
13261351

1327-
Both b. and e. stop before we bother to determine the template we're
1328-
going to use. That's because they don't actually use templates.
1329-
1330-
The template used is specified by the ``@template`` CGI variable, which
1331-
defaults to:
1352+
Both b. and e. don't use templates and stop before the template is
1353+
determined. For other contexts the template used is specified by the
1354+
``@template`` variable, which defaults to:
13321355

13331356
- only classname suplied: "index"
13341357
- full item designator supplied: "item"

0 commit comments

Comments
 (0)