Skip to content

Commit afaf1c9

Browse files
committed
doc: better document the template property in the request object.
1 parent 6b064c5 commit afaf1c9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

doc/glossary.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,19 @@ Roundup Glossary
8181

8282
template
8383

84-
this term has two meanings depending on context.
84+
this term has three meanings depending on context.
8585

8686
It refers to files that are processed by a templating engine to
8787
produce output suitable for machine or human consumption. For
8888
example a template could produce a html page that includes the
8989
name of the user.
9090

91+
It is an property of the request object in the templating
92+
system. Templates that are used with a specific class (e.g.
93+
``issue.item.html``) will have this entry set to the middle
94+
element (``item`` in this example). For templates like
95+
``home.html`` the element will be set to the empty string.
96+
9197
It also can mean a **Tracker template**. This is a set of files
9298
used to install a new tracker. Tracker templates define a
9399
tracker with a particular look and feel, :term:`schema`,

doc/reference.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2735,7 +2735,10 @@ The following variables are available to templates.
27352735
- "user" a HTMLItem instance for the current user
27362736
- "language" as determined by the browser or configuration
27372737
- "classname" the current classname (possibly None)
2738-
- "template" the current template (suffix, also possibly None)
2738+
- "template" the current template (e.g. for the ``issue.item.html``
2739+
template the template would be the ``item`` suffix on the
2740+
classname. It can also be the empty string (e.g. with the
2741+
``home.html`` template).
27392742
**config**
27402743
This variable holds all the values defined in the tracker config.ini
27412744
file (e.g. TRACKER_NAME, etc.)

0 commit comments

Comments
 (0)