X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sample%2Fquerygridview.py;h=abbecbbf7596974c7fc8a71c9584e00bb9ab1e8f;hb=4b6622264b59de3edb433a1f886faa2069a11960;hp=ef8d9937df311061f797f010f1bebcbb982bebd8;hpb=d9bbe0a36624c6fe558c05307964be1b3ed4e3b1;p=myslice.git diff --git a/sample/querygridview.py b/sample/querygridview.py index ef8d9937..abbecbbf 100644 --- a/sample/querygridview.py +++ b/sample/querygridview.py @@ -7,7 +7,7 @@ from manifold.core.query import Query, AnalyzedQuery from unfold.page import Page -from ui.topmenu import topmenu_items, the_user +from ui.topmenu import topmenu_items_live, the_user from plugins.querygrid import QueryGrid @@ -51,7 +51,7 @@ class QueryGridView (TemplateView): query = sq_resource, query_all = query_resource_all, # safer to use 'hrn' as the internal unique key for this plugin - id_key = main_query_init_key, + init_key = main_query_init_key, checkboxes = True, datatables_options = { 'iDisplayLength': 25, @@ -69,13 +69,10 @@ class QueryGridView (TemplateView): # more general variables expected in the template template_env [ 'title' ] = 'simple %(slicename)s'%locals() # the menu items on the top - template_env [ 'topmenu_items' ] = topmenu_items('Slice', request) + template_env [ 'topmenu_items' ] = topmenu_items_live('Slice', page) # so we can sho who is logged template_env [ 'username' ] = the_user (request) - # don't forget to run the requests - page.expose_queries () - # the prelude object in page contains a summary of the requirements() for all plugins # define {js,css}_{files,chunks} prelude_env = page.prelude_env()