[Toaster] [review-request] bbarrosp/project-builds
Barros Pena, Belen
belen.barros.pena at intel.com
Mon Aug 24 06:55:03 PDT 2015
On 24/08/2015 13:42, "Smith, Elliot" <elliot.smith at intel.com> wrote:
>On 21 August 2015 at 10:05, Barros Pena, Belen
><belen.barros.pena at intel.com> wrote:
>
>On 21/08/2015 00:34, "Brian Avery" <avery.brian at gmail.com> 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 == '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én
>
>
>
>NB request.resolver_match.url_name effectively does the reverse of
>
>
> url 'all-builds'
>
>
>Elliot
>
>
>
>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én
>
>>
>>-b
>>
>>On Thu, Aug 20, 2015 at 8:48 AM, Barros Pena, Belen
>><belen.barros.pena at intel.com> wrote:
>>> bbarrosp/project-builds
>>>
>>> de40156a5c6286e62964f28499cdf2680008f808
>>> bitbake: toastergui: adjust spacing in project pages
>>>
>>> 5759e617ff02d294557adacf8ef33a3272bbb91c
>>> bitbake: toastergui: fix global navigation
>>>
>>>
>>> Thanks!
>>>
>>> Belén
>>>
>>>
>>>
>>> --
>>> _______________________________________________
>>> toaster mailing list
>>> toaster at yoctoproject.org
>>>
>https://lists.yoctoproject.org/listinfo/toaster
><https://lists.yoctoproject.org/listinfo/toaster>
>
>--
>_______________________________________________
>toaster mailing list
>toaster at yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster
>
>
>
>
>
>
>
>
>
>--
>Elliot Smith
>Software Engineer
>Intel Open Source Technology Centre
>
>
>
>
More information about the toaster
mailing list