Hi Alex,

(a) Models.py

> {% if task.outcome == Task.OUTCOME_FAILED %}class=error{% elif %} ... 
> {%endif%}
Have you actually tried that code? I tried this first, but Django does not 
support it, as also reflected in many google searches on the subject.

I will move to trying a custom filter. I do hope that “Task.*” is defined for 
the context of the filter as well as the template.

(b) Ok, 4-space tabs it is!

(c) I explicitly removed "basebuildpage.html" because that content does not 
appear anywhere in the Recipe Details design document (as opposed to say Ravi’s 
Task document). I assumed that this was on purpose.
I will restore it then.
d) I see that Ravi used the basetable_top structure. I will adopt that as well.
(e) You wrote “Indeed, we use the pluralized name for pages showing an object 
list (i.e. tables), and the singular for the detail page for the a single 
object.”

Ok, I will stay with my current page names.

- David

From: Damian, Alexandru [mailto:[email protected]]
Sent: Monday, January 13, 2014 5:43 AM
To: Reyna, David
Cc: Lerner, Dave; [email protected]
Subject: Re: [Toaster] DRY RUN [Review Request] 4299 "recipes: View detailed 
information about a recipe"

Hi,

I have comments about the content of the patch, as well.
a). models.py; I am not very fond of having display code in the models, because 
it breaks the MVC separation. The display code should live in the templates, 
e.g.

    {% if task.outcome == Task.OUTCOME_FAILED %}class=error{% elif %} ... 
{%endif%}
If this is repeated elsewhere, like in this particular case, you should define 
a new tag in ./bitbake/lib/toaster/toastergui/templatetags/projecttags.py that 
returns the code:
@register.simple_tag
def task_outcome_highlight(task):
    if task.outcome == Task.OUTCOME_EXISTING:
        ret = ''
  .... etc ...
and then use it in the template:  {% task_outcome_highlight task %}
b). html format; please don't use tabs; use 4-space instead of a tab; this 
makes for a nice consistency with the HTML code, and fits the HTML code in page 
better.

c). recipe.html; please extend "basebuildpage.html" which fills in the 
breadcrumb and all the layout for viewing pages in a build context. see 
configvars.html for an example.
d). recipes.html; the latest versions of the basetable_top will automatically 
generate correct table header based on the context description; please don't 
include your own table header, but edit the page context  to correctly set the 
table data; see the build view / build.html as a how-to guide.
Hope this helps,
Alex





On Mon, Jan 13, 2014 at 12:42 PM, Damian, Alexandru 
<[email protected]<mailto:[email protected]>> wrote:
Hi David,

This is outstanding ! Thank you !
I have some comments about the form, not the content of the patch, which should 
make future work a bit easier.
- Indeed, we use the pluralized name for pages showing an object list (i.e. 
tables), and the singular for the detail page for the a single object.

- We can do patches over email, instead of git push, but it's harder to work 
this way. However, the email patches should be proper git patches for easy use.

You can get them like this:

$ git commit                  # you commit normally to git
$ git format-patch -n1   # you get a mailable version of the last patch from 
git;
0001-patch-name-as-it-appears-in-subject-line.patch     # the command will 
output the filename just written
Now, there are two options to send this file.
   - if sendmail, or any MTA for that matter, works on your machine, you just 
do:
$ git send-email --to [email protected]<mailto:[email protected]> 
0001-patch-name-as-it-appears-in-subject-line.patch      # replace with the 
file name just written
   - otherwise, open up your mail client, and copy/paste the contents of the 
file written in the mail, starting line 6, or just after the empty line after 
the Subject: line. Copy/paste the Subject: line content as your Subject:. Send 
this email :).


- The test procedure is outstanding !  I think we should use it for all the 
patches. For easier reference, I propose to get the test procedure in the 
bugzilla item that the patch addresses, as a comment.
The patch commit message should reference the bugzilla issue like this:
[YOCTO #0000]          # replace with the real bugzilla issue number

Hope all of this makes sense :)

I'll get to review the content of the patches separately.
Cheers,
Alex


On Sun, Jan 12, 2014 at 6:49 PM, Reyna, David 
<[email protected]<mailto:[email protected]>> wrote:
I used "recipes.html" for the page listing all recipes, and "recipe.html" for 
the individual recipe detail page. I can use different naming of course.

- David

> -----Original Message-----
> From: Lerner, Dave
> Sent: Sunday, January 12, 2014 9:56 AM
> To: Reyna, David
> Cc: [email protected]<mailto:[email protected]>
> Subject: RE: DRY RUN [Review Request] 4299 "recipes: View detailed
> information about a recipe"
>
> Hi David,
>
> I notice that you pluralized the recipe.html to recipes.html.  Doesn't
> that break the existing convention of singular for all templates?
>
> What is your suggested naming convention for templates, singular vs
> plural?  If those conventions are settled on by the team, then we
> should apply that naming convention to the project before we create a
> number of other templates.
>
> What do others think of the template naming conventions?
> Dave
>
_______________________________________________
toaster mailing list
[email protected]<mailto:[email protected]>
https://lists.yoctoproject.org/listinfo/toaster


--
Alex Damian
Yocto Project
SSG / OTC



--
Alex Damian
Yocto Project
SSG / OTC
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to