예제 #1
0
파일: views.py 프로젝트: mdaniloff/ruop
def my_view(request):
    
    dbsession = DBSession()
    result = dbsession.execute(sa.text("select vehicle_type, count(*) as total_number from appliances group by vehicle_type order by 2"))
    vehicle_type = request.params.getall('vehicle_type')
    filters = {
    'vehicle_type': vehicle_type,
    }
    
    return {'result':result, 'filters': filters}
예제 #2
0
파일: views.py 프로젝트: mdaniloff/ruop
def details_reference(request, reference):
    
    dbsession = DBSession()
    result = dbsession.execute(sa.text("select name, purpose from app_measure --where reference =%s "))
    print "THIS IS A REFERENCE --> " +str(reference)
    return {'project':'ruop', 'result': result, 'reference': reference}