Greetings folks,
I have been writing a trac ticket plugin that over rides the default
trac handler but it seems that if I try to do that it doesnt work.
import re
from trac.core import *
from trac.util import Markup
from trac.web import IRequestHandler
from trac.ticket.web_ui import TicketModule
class QATicketHandler(Component):
implements(IRequestHandler)
def match_request(self, req):
self.log.debug("Hello there is some sort of message")
match = re.match(r'/ticket/([0-9]+)$', req.path_info)
if match:
req.args['id'] = match.group(1)
return True
def process_request(self, req):
if req.method == 'POST':
if req.args.has_key('preview'):
return TicketModule.process_request(req)
return req
Its seems that there can only be one handler that matches to ticket in
the url, as I never see the log message in my log. I hoped to do some
processing of the extra fields if a given button is pressed then pass
on up to the TickModules process_request. The new button I have added
will fill in some extended fields that I have added to trac. Am I
going about this the wrong way?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---