Return-Path: X-Original-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 440689A9B for ; Fri, 15 Jun 2012 22:16:31 +0000 (UTC) Received: (qmail 36157 invoked by uid 500); 15 Jun 2012 22:16:30 -0000 Delivered-To: apmail-incubator-bloodhound-dev-archive@incubator.apache.org Received: (qmail 36098 invoked by uid 500); 15 Jun 2012 22:16:29 -0000 Mailing-List: contact bloodhound-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-dev@incubator.apache.org Received: (qmail 36088 invoked by uid 99); 15 Jun 2012 22:16:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 22:16:29 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_BLACK X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of olemis@gmail.com designates 209.85.212.177 as permitted sender) Received: from [209.85.212.177] (HELO mail-wi0-f177.google.com) (209.85.212.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 22:16:23 +0000 Received: by wibhm14 with SMTP id hm14so841096wib.0 for ; Fri, 15 Jun 2012 15:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=16MVFLajAgcinV8YDK02hLjpHuFDeaZCFw8BTFlS4h0=; b=Ik9WF0iA/bPrx9XHN+TGTPYcFZ6GN6OGoAwShoSzki4bS+U0WrLCfsB8Q7E26JsRcL K3ayD629csx3IAicUZDLU518vVJ5xpZ0hIOOMirTXOxRIzp5wZM5j4j3I1slN/Bywspv waILlP75wl67kqNXgwfs1/8+oaZPu0RUNZ3GOU1uMXbv8MEeJyzre4ZA+9FctlVzMW/O PPZOM0qwq31enG/VNxQgp9JksdbkijeIJh7Z/IO7T3AQLm8iBQ4/v5ufzmB7eByIrMGj waowWGO2wjMg3HqxAGEcR0hHOmOnj7wq1WYv+FXjHO572Gahv1kOkuVzq3FDeaq6iHsd E42g== MIME-Version: 1.0 Received: by 10.216.207.27 with SMTP id m27mr3852540weo.42.1339798562789; Fri, 15 Jun 2012 15:16:02 -0700 (PDT) Received: by 10.223.101.139 with HTTP; Fri, 15 Jun 2012 15:16:02 -0700 (PDT) In-Reply-To: <4FD9DEF5.5090903@wandisco.com> References: <4FD9DEF5.5090903@wandisco.com> Date: Fri, 15 Jun 2012 17:16:02 -0500 Message-ID: Subject: Re: [RFC] [multiproduct] Review #1 From: Olemis Lang To: bloodhound-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 On 6/14/12, Gary Martin wrote: > Hi Olemis, > Hi ! :) > A bit too much in that message to comment sensibly in a single email but > I will try to cover some points. The first part is a particularly > confusing as I do not see the common module in > bloodhound_multiproduct/multiproduct, I wonder if you are looking at the > right code. > Maybe it's an hgsvn side-effect once again ... :'( > Meanwhile I didn't follow the p prefix idea but instead decided on > req.path_info.startswith('/products') so that it is more obvious what it > is for. I don't mind variations on that but I think that /p is not > enough to retain clarity. Even if google use it. > yes , that's ok . any prefix is ok . Nonetheless I see this code for `ProductTicketModule.match_request` ... {{{ #!python PRODUCT_RE = re.compile(r'^/(?P[^/]*)(?P.*)') TICKET_RE = re.compile(r'/ticket/(?P[0-9]+)$') class ProductTicketModule(TicketModule): """Product Overrides for the TicketModule""" # IRequestHandler methods def match_request(self, req): """Override of TicketModule match_request""" match = PRODUCT_RE.match(req.path_info) if match: pid = match.group('pid') products = Product.select(self.env, where={'prefix':pid}) if len(products) == 1: req.args['productid'] = match.group('pid') req.args['product'] = products[0].name pathinfo = match.group('pathinfo') # is it a newticket request: if pathinfo == "/newticket": return True tmatch = TICKET_RE.match(pathinfo) if tmatch: req.args['id'] = tmatch.group('ticket') return True }}} ... and as a consequence it seems ticket URLs will look like http://server.com/path/to/bh/MyProduct/ticket/33 ... i.e. no prefix at all . [...] >> 3- I wonder whether it'd be a good idea to > > Possibly but it could be overkill if there are not going to be that many > additional models to support. > ok, no big deal ... ;) [...] >> 5- It's cool to have models ! :) > > I agree it would probably be better to use a pre-existing ORM - I would > quite like to see the whole of bloodhound including trac to use such an > approach so that more of the system can be taken a consistent step away > from raw SQL. +1 > I don't know if I am on my own in liking good ORMs of > course which is why I have not made too much of it. I do have a secret > desire to be using django's model and query system though! > ok , cool ! :) [...] > I think we are placing a higher priority on getting the basic interface > right than getting multi-product fully working (product namespaces, > permissions etc). By the way I reviewed the code because I wanted to start converting product pages to look like latest design , but it doesn't seem to work . I mean , I get 404 error pages if I enable `multiproduct.ticket_web_ui.ProductTicketModule` and disable `trac.ticket.web_ui.TicketModule` . So basically I cannot see ticket pages , or they do not contain product field anywhere , so I don't know how to set args for widgets displaying tickets [1]_ etc , etc, etc ... as basically I see no way to bind tickets to products I already created one product for testing purposes , btw ;) > I can see that work slipping to the next milestone if > we are not able to get more people interested in working with us and up > to speed in the short term. > ok ;) .. [1] Sample product page (http://svn.apache.org/repos/asf/incubator/bloodhound/trunk/doc/html-templates/product.html) -- Regards, Olemis.