X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fdashboardview.py;h=4beb7a9d53c888303e3d84604cd599e59ce3458d;hb=refs%2Fheads%2Fonelab;hp=06f02f831158d6732219bd3ece1d265760b6a538;hpb=be718e3336ee7ad98e90b0b3c97b58b37a467788;p=myslice.git diff --git a/portal/dashboardview.py b/portal/dashboardview.py index 06f02f83..4beb7a9d 100644 --- a/portal/dashboardview.py +++ b/portal/dashboardview.py @@ -11,7 +11,9 @@ from unfold.loginrequired import LoginRequiredAutoLogoutView from ui.topmenu import topmenu_items_live, the_user -from myslice.theme import ThemeView +from myslice.theme import ThemeView +from myslice.settings import logger + #This view requires login class DashboardView (LoginRequiredAutoLogoutView, ThemeView): @@ -25,7 +27,7 @@ class DashboardView (LoginRequiredAutoLogoutView, ThemeView): #messages.info(self.request, 'You have logged in') page = Page(self.request) - print "Dashboard page" + logger.info("Dashboard page") # Slow... #slice_query = Query().get('slice').filter_by('user.user_hrn', 'contains', user_hrn).select('slice_hrn') testbed_query = Query().get('network').select('network_hrn','platform','version') @@ -47,9 +49,9 @@ class DashboardView (LoginRequiredAutoLogoutView, ThemeView): # root_authority = sub_authority[0] # slice_query = Query().get(root_authority+':user').filter_by('user_hrn', '==', '$user_hrn').select('user_hrn', 'slice.slice_hrn') # else: - print "SLICE QUERY" - print "-" * 80 - slice_query = Query().get('user').filter_by('user_hrn', '==', '$user_hrn').select('slices.slice_hrn') + logger.debug("SLICE QUERY") + logger.debug("-" * 80) + slice_query = Query().get('myslice:user').filter_by('user_hrn', '==', '$user_hrn').select('slices.slice_hrn') page.enqueue_query(slice_query) page.enqueue_query(testbed_query)