From a287a6d9c195ac5a4242daa553c13896d523f69a Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Wed, 3 Sep 2014 14:20:25 +0100 Subject: bitbake: toaster: rename bldviewer projecttags custom tagset We rename the projecttags in bldviewer.templatetags to simple_projecttags in order to avoid conflict with the similarly named tagset in toastergui. The conflict leads to an intermittent bug where proper tags are not read correctly since Django uses only the module name as global tag library identificator. (Bitbake rev: a37f2c194d7e59611177cb8755524b7ad702fe91) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- .../toaster/bldviewer/templates/simple_build.html | 2 +- .../toaster/bldviewer/templates/simple_layer.html | 2 +- .../toaster/bldviewer/templates/simple_recipe.html | 2 +- .../toaster/bldviewer/templatetags/projecttags.py | 29 ---------------------- .../bldviewer/templatetags/simple_projecttags.py | 29 ++++++++++++++++++++++ 5 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 bitbake/lib/toaster/bldviewer/templatetags/projecttags.py create mode 100644 bitbake/lib/toaster/bldviewer/templatetags/simple_projecttags.py (limited to 'bitbake/lib/toaster/bldviewer') diff --git a/bitbake/lib/toaster/bldviewer/templates/simple_build.html b/bitbake/lib/toaster/bldviewer/templates/simple_build.html index a6983f5804..230e7c21ca 100644 --- a/bitbake/lib/toaster/bldviewer/templates/simple_build.html +++ b/bitbake/lib/toaster/bldviewer/templates/simple_build.html @@ -6,7 +6,7 @@ {% block pagetable %} - {% load projecttags %} + {% load simple_projecttags %} Outcome Started On diff --git a/bitbake/lib/toaster/bldviewer/templates/simple_layer.html b/bitbake/lib/toaster/bldviewer/templates/simple_layer.html index ae7172d9a0..25e7bf818e 100644 --- a/bitbake/lib/toaster/bldviewer/templates/simple_layer.html +++ b/bitbake/lib/toaster/bldviewer/templates/simple_layer.html @@ -5,7 +5,7 @@ {% endblock %} {% block pagetable %} - {% load projecttags %} + {% load simple_projecttags %} Name diff --git a/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html b/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html index 77b9de2525..3bff3b9a25 100644 --- a/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html +++ b/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html @@ -8,7 +8,7 @@ {% endblock %} {% block pagetable %} - {% load projecttags %} + {% load simple_projecttags %} diff --git a/bitbake/lib/toaster/bldviewer/templatetags/projecttags.py b/bitbake/lib/toaster/bldviewer/templatetags/projecttags.py deleted file mode 100644 index 1b8953c69d..0000000000 --- a/bitbake/lib/toaster/bldviewer/templatetags/projecttags.py +++ /dev/null @@ -1,29 +0,0 @@ -# -# ex:ts=4:sw=4:sts=4:et -# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- -# -# BitBake Toaster Implementation -# -# Copyright (C) 2013 Intel Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -from datetime import datetime -from django import template - -register = template.Library() - -@register.simple_tag -def time_difference(start_time, end_time): - return end_time - start_time diff --git a/bitbake/lib/toaster/bldviewer/templatetags/simple_projecttags.py b/bitbake/lib/toaster/bldviewer/templatetags/simple_projecttags.py new file mode 100644 index 0000000000..1b8953c69d --- /dev/null +++ b/bitbake/lib/toaster/bldviewer/templatetags/simple_projecttags.py @@ -0,0 +1,29 @@ +# +# ex:ts=4:sw=4:sts=4:et +# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- +# +# BitBake Toaster Implementation +# +# Copyright (C) 2013 Intel Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +from datetime import datetime +from django import template + +register = template.Library() + +@register.simple_tag +def time_difference(start_time, end_time): + return end_time - start_time -- cgit v1.2.3-54-g00ecf