toaster.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] toaster: update Toaster for Django 1.11
@ 2017-11-16  0:22 David Reyna
  0 siblings, 0 replies; only message in thread
From: David Reyna @ 2017-11-16  0:22 UTC (permalink / raw)
  To: toaster

From: David Reyna <David.Reyna@windriver.com>

Toaster needs to accomodate API changes in Django 1.11.

[YOCTO #12192]
---
 bitbake/lib/toaster/bldcollector/urls.py    | 2 +-
 bitbake/lib/toaster/toastergui/urls.py      | 2 +-
 bitbake/lib/toaster/toastergui/views.py     | 2 +-
 bitbake/lib/toaster/toastermain/settings.py | 2 +-
 bitbake/lib/toaster/toastermain/urls.py     | 2 +-
 bitbake/toaster-requirements.txt            | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bitbake/lib/toaster/bldcollector/urls.py b/bitbake/lib/toaster/bldcollector/urls.py
index 076afdb..888175d 100644
--- a/bitbake/lib/toaster/bldcollector/urls.py
+++ b/bitbake/lib/toaster/bldcollector/urls.py
@@ -17,7 +17,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 
-from django.conf.urls import patterns, include, url
+from django.conf.urls import include, url
 
 import bldcollector.views
 
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py
index 3ad5566..e07b0ef 100644
--- a/bitbake/lib/toaster/toastergui/urls.py
+++ b/bitbake/lib/toaster/toastergui/urls.py
@@ -16,7 +16,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.conf.urls import patterns, include, url
+from django.conf.urls import include, url
 from django.views.generic import RedirectView, TemplateView
 
 from django.http import HttpResponseBadRequest
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 334bb4a..209b07d 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -277,7 +277,7 @@ def _validate_input(field_input, model):
             return None, invalid + str(field_input_list)
 
         # Check we are looking for a valid field
-        valid_fields = model._meta.get_all_field_names()
+        valid_fields = [f.name for f in model._meta.get_fields()]
         for field in field_input_list[0].split(AND_VALUE_SEPARATOR):
             if True in [field.startswith(x) for x in valid_fields]:
                 break
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index 54ab31f..13541d3 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -186,7 +186,7 @@ TEMPLATES = [
                 'django.template.context_processors.tz',
                 'django.contrib.messages.context_processors.messages',
                 # Custom
-                'django.core.context_processors.request',
+                'django.template.context_processors.request',
                 'toastergui.views.managedcontextprocessor',
 
             ],
diff --git a/bitbake/lib/toaster/toastermain/urls.py b/bitbake/lib/toaster/toastermain/urls.py
index 6750bdf..e2fb0ae 100644
--- a/bitbake/lib/toaster/toastermain/urls.py
+++ b/bitbake/lib/toaster/toastermain/urls.py
@@ -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.conf.urls import patterns, include, url
+from django.conf.urls import include, url
 from django.views.generic import RedirectView, TemplateView
 from django.views.decorators.cache import never_cache
 import bldcollector.views
diff --git a/bitbake/toaster-requirements.txt b/bitbake/toaster-requirements.txt
index 3f47650..c0ec368 100644
--- a/bitbake/toaster-requirements.txt
+++ b/bitbake/toaster-requirements.txt
@@ -1,3 +1,3 @@
-Django>1.8,<1.9.9
+Django>1.8,<1.11.9
 beautifulsoup4>=4.4.0
 pytz
-- 
1.9.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-16  0:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16  0:22 [PATCH] toaster: update Toaster for Django 1.11 David Reyna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).