[yocto] [PATCH 2/2] [layerindex-web] views.py: layer in recipe search

Alex Franco alejandro.franco at linux.intel.com
Thu Oct 29 17:06:39 PDT 2015


Take layer name into account when searching for recipes. This is
accomplished by adding a layer name to the simplesearch.getquery
call in the recipe search view.

[YOCTO #6618]

Signed-off-by: Alex Franco <alejandro.franco at linux.intel.com>
---
 layerindex/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/layerindex/views.py b/layerindex/views.py
index 8be3311..c85940b 100644
--- a/layerindex/views.py
+++ b/layerindex/views.py
@@ -379,7 +379,7 @@ class RecipeSearchView(ListView):
         query_string = self.request.GET.get('q', '')
         init_qs = Recipe.objects.filter(layerbranch__branch__name=self.kwargs['branch'])
         if query_string.strip():
-            entry_query = simplesearch.get_query(query_string, ['pn', 'summary', 'description', 'filename'])
+            entry_query = simplesearch.get_query(query_string, ['pn', 'summary', 'description', 'filename', 'layerbranch__layer__name'])
             qs = init_qs.filter(entry_query).order_by('pn', 'layerbranch__layer')
         else:
             if 'q' in self.request.GET:
-- 
2.6.1




More information about the yocto mailing list