From d74bcbeaf241a67871d62b7e2c17900ae900642e Mon Sep 17 00:00:00 2001 From: David Reyna Date: Tue, 27 Jun 2017 13:44:28 -0700 Subject: bitbake: 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] (Bitbake rev: e4c7a94fac7a53fc146387a57e5a09b9ec3caca0) Signed-off-by: David Reyna Signed-off-by: Richard Purdie --- bitbake/lib/toaster/bldcollector/urls.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bitbake/lib/toaster/bldcollector/urls.py') diff --git a/bitbake/lib/toaster/bldcollector/urls.py b/bitbake/lib/toaster/bldcollector/urls.py index 64722f2cdc..076afdb722 100644 --- a/bitbake/lib/toaster/bldcollector/urls.py +++ b/bitbake/lib/toaster/bldcollector/urls.py @@ -1,7 +1,7 @@ # # BitBake Toaster Implementation # -# Copyright (C) 2014 Intel Corporation +# Copyright (C) 2014-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,9 @@ from django.conf.urls import patterns, include, url -urlpatterns = patterns('bldcollector.views', +import bldcollector.views + +urlpatterns = [ # landing point for pushing a bitbake_eventlog.json file to this toaster instace - url(r'^eventfile$', 'eventfile', name='eventfile'), - ) + url(r'^eventfile$', bldcollector.views.eventfile, name='eventfile'), +] -- cgit v1.2.3-54-g00ecf