def my_queries(request):
 DEFAULT_PAGE_SIZE = 30
 app_name = get_app_name(request)
 prefix = 'h-'
 querydict_history = _copy_prefix(prefix, request.GET)
 querydict_history[(prefix + 'user')] = request.user
 querydict_history[(prefix + 'type')] = app_name
 (hist_page, hist_filter) = _list_query_history(request.user, querydict_history, DEFAULT_PAGE_SIZE, prefix)
 prefix = 'q-'
 querydict_query = _copy_prefix(prefix, request.GET)
 querydict_query[(prefix + 'user')] = request.user
 querydict_query[(prefix + 'type')] = app_name
 (query_page, query_filter) = _list_designs(request.user, querydict_query, DEFAULT_PAGE_SIZE, prefix)
 filter_params = hist_filter
 filter_params.update(query_filter)
 return render('my_queries.mako', request, {'request': request, 'h_page': hist_page, 'q_page': query_page, 'filter_params': filter_params, 'designs_json': json.dumps([query.id for query in query_page.object_list])})

def my_queries ( request ) : DEFAULT_PAGE_SIZE = 30 app_name = get_app_name ( request ) prefix = 'h-' querydict_history = _copy_prefix ( prefix , request . GET ) querydict_history [ ( prefix + 'user' ) ] = request . user querydict_history [ ( prefix + 'type' ) ] = app_name ( hist_page , hist_filter ) = _list_query_history ( request . user , querydict_history , DEFAULT_PAGE_SIZE , prefix ) prefix = 'q-' querydict_query = _copy_prefix ( prefix , request . GET ) querydict_query [ ( prefix + 'user' ) ] = request . user querydict_query [ ( prefix + 'type' ) ] = app_name ( query_page , query_filter ) = _list_designs ( request . user , querydict_query , DEFAULT_PAGE_SIZE , prefix ) filter_params = hist_filter filter_params . update ( query_filter ) return render ( 'my_queries.mako' , request , { 'request' : request , 'h_page' : hist_page , 'q_page' : query_page , 'filter_params' : filter_params , 'designs_json' : json . dumps ( [ query . id for query in query_page . object_list ] ) } )
view a mix of history and saved queries .