From 2318f92580eeb7042bf9d4d6dd2f514856b69d4a Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 22 Aug 2016 16:42:33 +0100 Subject: bitbake: toaster: Move Custom image recipe rest api to api file We now have a dedicated file for the rest API so move and rework for class based views. Also clean up all flake8 identified warnings. Remove unused imports from toastergui views. The original work for this API was done by Elliot Smith, Ed Bartosh, Michael Wood and Dave Lerner (Bitbake rev: 37c2b4f105d7334cdd83d9675af787f4327e7fe7) Signed-off-by: Michael Wood Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/urls.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'bitbake/lib/toaster/toastergui/urls.py') diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py index 9892d2ab93..9509cd5928 100644 --- a/bitbake/lib/toaster/toastergui/urls.py +++ b/bitbake/lib/toaster/toastergui/urls.py @@ -199,19 +199,25 @@ urlpatterns = patterns('toastergui.views', url(r'^js-unit-tests/$', 'jsunittests', name='js-unit-tests'), # image customisation functionality - url(r'^xhr_customrecipe/(?P\d+)/packages/(?P\d+|)$', - 'xhr_customrecipe_packages', name='xhr_customrecipe_packages'), + url(r'^xhr_customrecipe/(?P\d+)' + '/packages/(?P\d+|)$', + api.XhrCustomRecipePackages.as_view(), + name='xhr_customrecipe_packages'), url(r'^xhr_customrecipe/(?P\d+)/packages/$', - 'xhr_customrecipe_packages', name='xhr_customrecipe_packages'), + api.XhrCustomRecipePackages.as_view(), + name='xhr_customrecipe_packages'), - url(r'^xhr_customrecipe/(?P\d+)$', 'xhr_customrecipe_id', + url(r'^xhr_customrecipe/(?P\d+)$', + api.XhrCustomRecipeId.as_view(), name='xhr_customrecipe_id'), - url(r'^xhr_customrecipe/', 'xhr_customrecipe', + + url(r'^xhr_customrecipe/', + api.XhrCustomRecipe.as_view(), name='xhr_customrecipe'), url(r'^xhr_buildrequest/project/(?P\d+)$', - api.XhrBuildRequest.as_view(), + api.XhrBuildRequest.as_view(), name='xhr_buildrequest'), url(r'^mostrecentbuilds$', api.MostRecentBuildsView.as_view(), -- cgit v1.2.3-54-g00ecf