Hi,
Thank you very much for your reply. I have implemented IRequestFilter
interface, which writes the result from a db query into a custom ticket
label (this custom ticket label is defined in conf/trac.ini). Now, i have
the following problem. By default, the db returns a string, which consists
of greek characters. Unfortunately, this string cannot be recognized on the
ticket interface (it appears a string that consist of multiple '?' , while
it should be a string with greek characters). I use the following code to
do this,
info = cursor.fetchone()
s_info = str(info)
if info:
self.config.set('ticket-custom','details.value',s_info)
What can i do ?
Thanks in advance!
On Fri, Mar 22, 2013 at 10:55 PM, Steffen Hoffmann <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 22.03.2013 10:03, comadreha wrote:
> ...
> > In addition, i have created a python function, which takes a trac
> > username as an input and returns additional information for the
> > ticket sender by querying the local oracle database. However, how can
> > i embed this function to the trac system ?
>
> It depends on how you want to use that information. For bringing it into
> ticket views you'll want to implement the IRequestFilter [1] interface
> to act on calls to tickets and ITemplateStreamFilter [2] for inserting
> some HTML containing that additional information into the ticket page on
> the fly.
>
> If you want to insert information directly into ticket fields, you'll
> want to take a look at the ITicketManipulator [3] especially its
> 'prepare_ticket' method, but unluckily it is unused until now. Speaking
> about the ITicketChangeListener, its whole point is to notify and
> possibly act upon ticket creation/changes, but I doubt that this will be
> what you need/want.
>
> Steffen Hoffmann
>
>
> [1]
>
> http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.IRequestFilter
> [2]
>
> http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.ITemplateStreamFilter
> [3]
>
> http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.ITicketManipulator
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlFMxUUACgkQ31DJeiZFuHeAigCfWk0YKhsyTApjvMDJi+riGEb4
> +KwAoLPbTlCBm76gLz/OXE8/1iUPChaT
> =CsQt
> -----END PGP SIGNATURE-----
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/trac-dev?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Κωνσταντίνος Λάλος
--
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.