From: Elliot Smith Date: Thu, 10 Dec 2015 03:56:33 +0000 (-0800) Subject: bitbake: toaster: Prevent deprecation warnings for RedirectView X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=717c636d71e8cd32cf8e05968adbf5c835bcfb31;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: toaster: Prevent deprecation warnings for RedirectView The API for RedirectView is due to change in Django 1.9, which means that Toaster generates deprecation warnings. Set the "permanent" flag when constructing RedirectView instances to prevent this warning. [YOCTO #8364] (Bitbake rev: 4aa09488bfe65cb365356b320cd9865643bb4fe5) Signed-off-by: Elliot Smith Signed-off-by: Ed Bartosh Signed-off-by: brian avery Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/toaster/bldcollector/urls.py b/bitbake/lib/toaster/bldcollector/urls.py index 144387b56a7..64722f2cdc5 100644 --- a/bitbake/lib/toaster/bldcollector/urls.py +++ b/bitbake/lib/toaster/bldcollector/urls.py @@ -18,7 +18,6 @@ from django.conf.urls import patterns, include, url -from django.views.generic import RedirectView urlpatterns = patterns('bldcollector.views', # landing point for pushing a bitbake_eventlog.json file to this toaster instace diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py index a1adbb7be02..2bf2d99ae74 100644 --- a/bitbake/lib/toaster/toastergui/urls.py +++ b/bitbake/lib/toaster/toastergui/urls.py @@ -168,5 +168,5 @@ urlpatterns = patterns('toastergui.views', name='xhr_customrecipe'), # default redirection - url(r'^$', RedirectView.as_view( url= 'landing')), + url(r'^$', RedirectView.as_view(url='landing', permanent=True)), ) diff --git a/bitbake/lib/toaster/toastermain/urls.py b/bitbake/lib/toaster/toastermain/urls.py index 5ce5a924d8c..534679dc500 100644 --- a/bitbake/lib/toaster/toastermain/urls.py +++ b/bitbake/lib/toaster/toastermain/urls.py @@ -45,7 +45,7 @@ urlpatterns = patterns('', url(r'^orm/eventfile$', 'bldcollector.views.eventfile'), # if no application is selected, we have the magic toastergui app here - url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/'))), + url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/', permanent=True))), ) import toastermain.settings