Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 00950E009B3; Mon, 24 Aug 2015 06:55:13 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 0B2D6E009B3 for ; Mon, 24 Aug 2015 06:55:07 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 24 Aug 2015 06:55:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,738,1432623600"; d="scan'208";a="789885743" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga002.jf.intel.com with ESMTP; 24 Aug 2015 06:55:06 -0700 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.144]) by IRSMSX109.ger.corp.intel.com ([169.254.13.183]) with mapi id 14.03.0224.002; Mon, 24 Aug 2015 14:55:03 +0100 From: "Barros Pena, Belen" To: "Smith, Elliot" Thread-Topic: [Toaster] [review-request] bbarrosp/project-builds Thread-Index: AQHQ21+ZxzQF3EepoUKunwp97ziTAJ4VeeSAgACwboCABOLHgIAAJRiA Date: Mon, 24 Aug 2015 13:55:03 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.4.150722 x-originating-ip: [10.237.224.30] MIME-Version: 1.0 Cc: "toaster@yoctoproject.org" Subject: Re: [review-request] bbarrosp/project-builds X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2015 13:55:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <08915E19D6227941B149B8181D75E363@intel.com> Content-Transfer-Encoding: quoted-printable On 24/08/2015 13:42, "Smith, Elliot" wrote: >On 21 August 2015 at 10:05, Barros Pena, Belen > wrote: > >On 21/08/2015 00:34, "Brian Avery" wrote: > >>I'm far from an expert in this, but it seems like basing logic on url >>paths is kinda fragile (5759e6). > >> Are there better options? > >There are 2 options I can think of: > >1. Create separate templates, but that would require 4 of them (for all >builds, all projects, landing and all other pages) and sounds like a >nightmare to maintain > >2. Use a different element of the content for the conditional, although >that sounds even more fragile than using the url, since the url is bound >to be more stable than the content. > > > > >For 2, it's possible to get the "url name" for the requested view, which >should be more stable than the URL or other page content, e.g. > > > {% if request.resolver_match.url_name =3D=3D 'all-builds' %} Thanks, Elliot This sounds better to me, particularly because it means we don't need to change the actual URL (I am bit concerned about what that could break). I will send a v2. Cheers Bel=E9n > > > >NB request.resolver_match.url_name effectively does the reverse of > > > url 'all-builds' > > >Elliot >=20 > > >There are probably others though: I just can't think of them :) This is >Michael's code, so I can hold off until he comes back and see what he >suggests. > >Thanks! > >Bel=E9n > >> >>-b >> >>On Thu, Aug 20, 2015 at 8:48 AM, Barros Pena, Belen >> wrote: >>> bbarrosp/project-builds >>> >>> de40156a5c6286e62964f28499cdf2680008f808 >>> bitbake: toastergui: adjust spacing in project pages >>> >>> 5759e617ff02d294557adacf8ef33a3272bbb91c >>> bitbake: toastergui: fix global navigation >>> >>> >>> Thanks! >>> >>> Bel=E9n >>> >>> >>> >>> -- >>> _______________________________________________ >>> toaster mailing list >>> toaster@yoctoproject.org >>>=20 >https://lists.yoctoproject.org/listinfo/toaster > > >-- >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster > > > > > > > > > >--=20 >Elliot Smith >Software Engineer >Intel Open Source Technology Centre > > > >