[Toaster] [PATCH 3/7] toaster: add template filter get_alldeps

Ed Bartosh ed.bartosh at linux.intel.com
Wed Sep 30 05:02:53 PDT 2015


This filter will be used in the tables.py template to call
Layer_Version.get_alldeps API. This API has a parameter and
the only way to pass parameter from Django template to the
function is to use filter.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 bitbake/lib/toaster/toastergui/templatetags/projecttags.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index 75f2261..55f255b 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -297,3 +297,7 @@ def cut_path_prefix(fullpath, prefixes):
         if fullpath.startswith(prefix):
             return relpath(fullpath, prefix)
     return fullpath
+
+ at register.filter
+def get_alldeps(lver, project_id):
+    return lver.get_alldeps(int(project_id))
-- 
2.1.4



More information about the toaster mailing list