-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ethan Jucovy writes:
>
>
> req is a Request object, from trac.web.api --
>
> [..]
>
> On Mon, Nov 1, 2010 at 8:07 PM, Chris Nelson <Chris.Nelson <at>
sixnet.com> wrote:In Subtickets plugin, I find:
> def filter_stream(self, req, method, filename, stream, data):
> ....
> href = req.href.query(status='!
> closed',
> owner=ticket['owner'])
> and I want to change the link that is created. Immediately, I want it
> to go to a report:
> href = somefunc("report/99?USER=%s" %
> ticket['owner'])
> Ideally, the first string in there would be configurable. But I can't
> find what req or req.href is or what other methods or properties it
> has. Maybe this is as simple as
> href = req.href.url("/report/99/USER=
> %s" % ticket['owner'])
> But I don't know if there is such a function. I've poked at Trac and
> Genshi web sites and sample and Googled lots of terms and haven't
> found an answer.
I'm searching for similar things right now. Read as Ethan advised. I
came across trac.web.href by own research. Actually it's well documented
in the source.
Deduced from that reading a simple
href = req.href.report(99, user=ticket['owner'])
should be enough.
Steffen Hoffmann
(hasienda)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkzlzyYACgkQ31DJeiZFuHfdhACcCdoNv7MFhakbbCOksAHdvL+v
tr4An1et6Izl9oP4Hjzkppo23MH8Ab4U
=nqP+
-----END PGP SIGNATURE-----
--
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en.