Commits

Christian Boos committed 890b2a0

web: document `Request.href` and `Request.abs_href` (#5627)

Comments (0)

Files changed (2)

doc/api/trac_web_api.rst

       The name associated with the user after authentification or
       `'anonymous'` if no authentification took place.
 
+   .. attribute :: Request.href
+
+      An `~trac.web.href.Href` instance for generating *relative* URLs
+      pointing to resources within the current Trac environment.
+
+   .. attribute :: Request.abs_href
+
+      An `~trac.web.href.Href` instance for generating *absolute* URLs
+      pointing to resources within the current Trac environment.
+
 
 .. autoclass :: trac.web.api.RequestDone
    :members:
 
-See also `trac.web.href.Href`.
     >>> href.browser('/trunk/README.txt', format='txt')
     '/trac/browser/trunk/README.txt?format=txt'
     
-    The path_safe argument specifies the characters that don't need to be
-    quoted in the path arguments. Likewise, the query_safe argument specifies
-    the characters that don't need to be quoted in the query string:
+    The ``path_safe`` argument specifies the characters that don't
+    need to be quoted in the path arguments. Likewise, the
+    ``query_safe`` argument specifies the characters that don't need
+    to be quoted in the query string:
 
     >>> href = Href('')
     >>> href.milestone('<look,here>', param='<here,too>')