示例#1
0
def maintable(request):
    form = search_form(request)
    if form.is_valid():
        json = simplejson.dumps(search_runs(form.cleaned_data, request))
    else:
        json = simplejson.dumps("form not valid" + str(form.errors))

    return HttpResponse(json, mimetype='application/json')
示例#2
0
def fill(request, fillid):
    fill = get_object_or_404(Rundbfills, pk=fillid)
    search_data = {'fillid_min':fillid, 'partitions':'LHCb',
                   'destinations':'OFFLINE', 'onpage':100}
    return render_to_response('rundb/rundb_fill.html',
      {'fill':fill, 'fills':[fill], 'single':True, 
       'stat':search_runs(search_data, request)}, 
       context_instance=RequestContext(request))