On 16. Jul, 2013, at 21:36, Olemis Lang wrote:

> On 7/16/13, Jure Zitnik <[email protected]> wrote:
> [...]
>> 
>> The ProductizedHref is, as Matevz already mentioned, a wrapper that
>> encapsulates global Href and renders either product scoped or global
>> (for PATHS_NO_TRANSFORM, STATIC_PREFIXES) URLs. Creation of
>> ProductizedHref is controlled by ProductRequestWithSession.
>> 
>> Example would be:
>>> from trac.web.href import Href
>>> from multiproduct.hooks import ProductizedHref
>>> global_href = Href('/')
>>> product_href = ProductizedHref(global_href, '/myproduct')
>>> product_href.admin(a=2, b=3)
>> '/admin?a=2&b=3'
>>> product_href.milestone(a=2, b=3)
>> '/myproduct/milestone?a=2&b=3'
>> 
>> The use of ProductizedHref should be completely transparent as it's
>> hidden from the code through the ProductRequestFactory ...
>> 
> 
> So , putting this answer in context considering the original question
> posed by Ryan in the ticket it seems to me that the answer is that
> sample code in comment::ticket:579 works as expected because base URL
> is provided as second arg .
> 
> Anyway previous messages made me  recall Branko's message (citation
> needed) regarding the decision of using default product config for
> upgrades and deprecating its use for anything else. JFTR ,
> 
> I've been deploying 0.6 without using ProductizedHref . Instead I
> supply RequestWithSession ... but beware of the fact that it MUST be
> patched to insert _global_href attribute because it seems to be used
> in Genshi templates and leads to a number of serious failures .
> 
> Should we have a separate ticket for applying such changes and related
> enhancements ?

That makes sense to me. Perhaps a smallish BEP could also be considered,
to document the current state/findings and solutions?

> 
> -- 
> Regards,
> 
> Olemis.

Reply via email to