diff options
author | David Reyna <David.Reyna@windriver.com> | 2017-06-27 13:44:28 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-27 22:17:53 +0100 |
commit | e4c7a94fac7a53fc146387a57e5a09b9ec3caca0 (patch) | |
tree | cffd5606db9cc2e155498348b908ce01099356f9 /lib/toaster/orm/management/commands/lsupdates.py | |
parent | 22cc318be1aff16f1b653ff0650fe71d0e9f60bb (diff) | |
download | bitbake-contrib-e4c7a94fac7a53fc146387a57e5a09b9ec3caca0.tar.gz |
toaster: address Django-1.10 API deprecations
There are four main API deprecations in Django-1.10:
(a) String view arguments to url() must be replaced by
the explicit class reference
(b) New TEMPLATES stucture in settings.py consolidates
TEMPLATE_DIRS, TEMPLATE_CONTEXT_PROCESSORS,
TEMPLATE_LOADERS, TEMPLATE_STRING_IF_INVALID, and
TEMPLATE_DEBUG
(c) patterns() wrapper in url() is removed, with
urlpatterns now a simple list
(d) NoArgsCommand in commands() must be replace by
BaseCommand, and handle_noargs() changed to
handle()
Also, the Django version checker must be updated to accept
two digit sub-version numbers (e.g. "1.8" < "1.10")
[YOCTO #11684]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/orm/management/commands/lsupdates.py')
-rw-r--r-- | lib/toaster/orm/management/commands/lsupdates.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/toaster/orm/management/commands/lsupdates.py b/lib/toaster/orm/management/commands/lsupdates.py index 68c6c423d..90f07c9dc 100644 --- a/lib/toaster/orm/management/commands/lsupdates.py +++ b/lib/toaster/orm/management/commands/lsupdates.py @@ -4,7 +4,7 @@ # # BitBake Toaster Implementation # -# Copyright (C) 2016 Intel Corporation +# Copyright (C) 2016-2017 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 @@ -19,7 +19,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -from django.core.management.base import NoArgsCommand +from django.core.management.base import BaseCommand from orm.models import LayerSource, Layer, Release, Layer_Version from orm.models import LayerVersionDependency, Machine, Recipe @@ -56,7 +56,7 @@ class Spinner(threading.Thread): self.signal = False -class Command(NoArgsCommand): +class Command(BaseCommand): args = "" help = "Updates locally cached information from a layerindex server" @@ -307,5 +307,5 @@ class Command(NoArgsCommand): os.system('setterm -cursor on') - def handle_noargs(self, **options): + def handle(self, **options): self.update() |