[Toaster] [review-request] Bug #5920 "Secondary sorting criteria not working"
Reyna, David
david.reyna at windriver.com
Thu Mar 27 09:13:44 PDT 2014
Hi Belen,
The 'get_dict_value' filter is part of Bug 5947 - "Replace fstypes lookup".
Did you cherry-pick "dreyna/fstypes_v2" and "dreyna/duplicates_6012"?
- David
> -----Original Message-----
> From: Barros Pena, Belen [mailto:belen.barros.pena at intel.com]
> Sent: Thursday, March 27, 2014 4:48 AM
> To: Reyna, David; DAMIAN, ALEXANDRU
> Cc: toaster at yoctoproject.org
> Subject: Re: [review-request] Bug #5920 "Secondary sorting criteria not
> working"
>
> On 26/03/2014 23:34, "Reyna, David" <david.reyna at windriver.com> wrote:
>
> >Hi Belen,
> >
> >Here is my branch for 5920 ³Secondary sorting criteria not working². It
> >will add a secondary sort for all tables when the current sort is a
> >different column that the table¹s respective default sort.
> >
> >The branch is here: dreyna/secondary_sort_5920
>
> I am getting an error in the builds page with this branch:
>
> Invalid filter: 'get_dict_value'
>
> Full trace below:
>
> Environment:
>
>
> Request Method: GET
> Request URL:
> http://localhost:8000/gui/builds/?count=10&orderby=completed_on%3A-&page=1
>
> Django Version: 1.5
> Python Version: 2.7.3
> Installed Applications:
> ('django.contrib.staticfiles',
> 'django.contrib.humanize',
> 'orm',
> 'toastermain',
> 'toastergui',
> 'bldviewer',
> 'south')
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware')
>
>
> Template error:
> In template
> /home/yocto/poky/bitbake/lib/toaster/toastergui/templates/build.html,
> error at line 96
> Invalid filter: 'get_dict_value'
> 86 : <td class="target">{% for t in build.target_set.all %}
> <a href="{% url "builddashboard" build.id <http://build.id/> %}">
> {{t.target}} </a> <br />{% endfor %}</td>
>
>
> 87 : <td class="machine"><a href="{% url "builddashboard"
> build.id <http://build.id/> %}">{{build.machine}}</a></td>
>
>
> 88 : <td class="started_on"><a href="{% url
> "builddashboard" build.id <http://build.id/>
> %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
>
>
> 89 : <td class="completed_on"><a href="{% url
> "builddashboard" build.id <http://build.id/>
> %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
>
>
> 90 : <td class="failed_tasks error">{% query
> build.task_build outcome=4 order__gt=0 as exectask%}{% if exectask.count
> == 1 %}<a href="{% url "task" build.id <http://build.id/> exectask.0.id
> <http://exectask.0.id/> %}">{{exectask.0.recipe.name
> <http://exectask.0.recipe.name/>}}.{{exectask.0.task_name}}</a>{% elif
> exectask.count > 1%}<a href="{% url "tasks" build.id <http://build.id/>
> %}?filter=outcome%3A4">{{exectask.count}}</a>{%endif%}</td>
>
>
> 91 : <td class="errors_no">{% if build.errors_no %}<a
> class="errors_no error" href="{% url "builddashboard" build.id
> <http://build.id/>%}#errors">{{build.errors_no}}
> error{{build.errors_no|pluralize}}</a>{%endif%}</td>
>
>
> 92 : <td class="warnings_no">{% if build.warnings_no %}<a
> class="warnings_no warning" href="{% url "builddashboard" build.id
> <http://build.id/> %}#warnings">{{build.warnings_no}}
> warning{{build.warnings_no|pluralize}}</a>{%endif%}</td>
>
>
> 93 : <td class="time"><a href="{% url "buildtime" build.id
> <http://build.id/> %}">{{build.timespent|sectohms}}</a></td>
>
>
> 94 : <td class="log">{{build.cooker_log_path}}</td>
>
>
> 95 : <td class="output">
>
>
> 96 : {% if build.outcome == build.SUCCEEDED %}
>
>
> 97 : <a href="{%url "builddashboard" build.id
> <http://build.id/>%}#images">{{fstypes|get_dict_value:build.id
> <http://build.id/>}}</a>
>
>
> 98 : {% endif %}
>
>
> 99 : </td>
>
>
> 100 : </tr>
>
>
> 101 :
>
>
> 102 : {% endfor %}
>
>
> 103 :
>
>
> 104 :
>
>
> 105 : {% include "basetable_bottom.html" %}
>
>
> 106 :
>
>
> Traceback:
> File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py"
> in get_response
> 115. response = callback(request,
> *callback_args, **callback_kwargs)
> File "/home/yocto/poky/bitbake/lib/toaster/toastergui/views.py" in builds
> 376. return render(request, template, context)
> File "/usr/local/lib/python2.7/dist-packages/django/shortcuts/__init__.py"
> in render
> 53. return HttpResponse(loader.render_to_string(*args, **kwargs),
> File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in
> render_to_string
> 170. t = get_template(template_name)
> File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in
> get_template
> 146. template, origin = find_template(template_name)
> File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in
> find_template
> 135. source, display_name = loader(name, dirs)
> File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in
> __call__
> 43. return self.load_template(template_name, template_dirs)
> File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in
> load_template
> 49. template = get_template_from_string(source, origin,
> template_name)
> File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in
> get_template_from_string
> 157. return Template(source, origin, name)
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> __init__
> 125. self.nodelist = compile_string(template_string, origin)
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> compile_string
> 153. return parser.parse()
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> parse
> 274. compiled_result = compile_func(self, token)
> File
> "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in
> do_extends
> 215. nodelist = parser.parse()
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> parse
> 274. compiled_result = compile_func(self, token)
> File
> "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in
> do_block
> 190. nodelist = parser.parse(('endblock',))
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> parse
> 274. compiled_result = compile_func(self, token)
> File
> "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in
> do_if
> 917. nodelist = parser.parse(('endif',))
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> parse
> 274. compiled_result = compile_func(self, token)
> File
> "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in
> do_for
> 767. nodelist_loop = parser.parse(('empty', 'endfor',))
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> parse
> 274. compiled_result = compile_func(self, token)
> File
> "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in
> do_if
> 903. nodelist = parser.parse(('elif', 'else', 'endif'))
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> parse
> 253. filter_expression =
> self.compile_filter(token.contents)
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> compile_filter
> 353. return FilterExpression(token, self)
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> __init__
> 564. filter_func = parser.find_filter(filter_name)
> File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in
> find_filter
> 359. raise TemplateSyntaxError("Invalid filter: '%s'" %
> filter_name)
>
> Exception Type: TemplateSyntaxError at /gui/builds/
> Exception Value: Invalid filter: 'get_dict_value'
>
>
>
> >
> >It depends on these two commits before it:
> > 6012:
> >f648d5018f7d3ae6eb81f0a05bdbbfe51080eece ³Duplicate search results
> >returned in the build page²
> > 5947:fd12d8aad22eadee20723a1b5323035e0ac47742 ³Replace fstypes lookup
> >on main build page²
> >
> >Thanks,
> >David
> >
> >
> >
> >
>
More information about the toaster
mailing list