Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-28 Thread Carsten Klein
Alas, this will still fail under certain conditions, namely, the plugin might implement multiple instances of for example IResourceManager and put these all in the same location or module. In that case, the actual implementation that belongs to the for example IRequestHandler instance cannot be f

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-28 Thread Carsten Klein
Hi Christian, it turns out, after me getting familiar with pkg_resources a bit, that it is easy to implement using for example the below function (the dist compare below is like to not work, I have still to debug and integrate it): def get_instance(iface, provider): """Gets an instance of th

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-28 Thread Carsten Klein
Hi, > How will you decide where to redirect the request? Based on what? Well, basically it is a plugin for establishing wiki page redirections based on IWikiChangeListener#page_renamed events. > Tell me more about this "redirection management kind of plugin". I > wrote a small plugin that does

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-28 Thread Jan Schukat
On Tue, 2010-04-27 at 18:27 -0300, Dalton Barreto wrote: > 2010/4/27 Carsten Klein : > > > > In my request filter (for a redirection management kind of plugin), I have > > the problem that sometimes, on access to for example > > > > http://trac-example.org/ > > > > I do not know which realm the

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Noah Kantrowitz
On Apr 27, 2010, at 2:27 PM, Dalton Barreto wrote: > 2010/4/27 Carsten Klein : >> >> In my request filter (for a redirection management kind of plugin), I have >> the problem that sometimes, on access to for example >> >> http://trac-example.org/ >> >> I do not know which realm the request is t

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Dalton Barreto
2010/4/27 Carsten Klein : > > In my request filter (for a redirection management kind of plugin), I have > the problem that sometimes, on access to for example > > http://trac-example.org/ > > I do not know which realm the request is to be associated with. Therefore, > I am unable to find existing

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Felix Schwarz
Am 27.04.2010 15:43, schrieb Carsten Klein: AFAIK, IRequestHandlers are only implemented by systems that will also manage resources. That is not true. You basically need an IRequestHandler for just any custom web page (basically you register your plugin under one url). So having a custom url

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Carsten Klein
>> On 4/27/2010 3:08 PM, Carsten Klein wrote: > I know that this information can basically be gather from the > IResourceManager interface, however, there is no relation between the > two > interfaces right now, so I am not able to guess the responsible > resource > manager

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Carsten Klein
> How about first telling us more about your use case? The above sounds > awfully vague ... Okay, back to start: In my request filter (for a redirection management kind of plugin), I have the problem that sometimes, on access to for example http://trac-example.org/ I do not know which realm th

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Carsten Klein
> >> On 4/27/2010 3:08 PM, Carsten Klein wrote: > I know that this information can basically be gather from the > IResourceManager interface, however, there is no relation between the > two > interfaces right now, so I am not able to guess the responsible > resource > manag

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Christian Boos
On 4/27/2010 3:43 PM, Carsten Klein wrote: On 4/27/2010 3:08 PM, Carsten Klein wrote: I know that this information can basically be gather from the IResourceManager interface, however, there is no relation between the two interfaces right now, so I am not able to guess the responsibl

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Carsten Klein
> On 4/27/2010 3:08 PM, Carsten Klein wrote: I know that this information can basically be gather from the IResourceManager interface, however, there is no relation between the two interfaces right now, so I am not able to guess the responsible resource manager from t

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Christian Boos
On 4/27/2010 3:08 PM, Carsten Klein wrote: I know that this information can basically be gather from the IResourceManager interface, however, there is no relation between the two interfaces right now, so I am not able to guess the responsible resource manager from the handler alone. I d

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Carsten Klein
Hi, >> I know that this information can basically be gather from the >> IResourceManager interface, however, there is no relation between the >> two >> interfaces right now, so I am not able to guess the responsible resource >> manager from the handler alone. >> > > I don't think it would make se

Re: [Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Christian Boos
Hello, On 4/27/2010 1:53 PM, Carsten Klein wrote: for a plugin of mine (a plugin used with redirections), I need to find out what is the current default handler and also which contexts that it will be responsible for. As of now, I cannot find out from web.main.RequestHandler#default_handler, or

[Trac-dev] Extending the IRequestHandler interface to provide more information

2010-04-27 Thread Carsten Klein
Hi, for a plugin of mine (a plugin used with redirections), I need to find out what is the current default handler and also which contexts that it will be responsible for. As of now, I cannot find out from web.main.RequestHandler#default_handler, or from the handler I am being passed in my reque