예제 #1
0
def schema_map_source_run(req, dbname, sid):
    db = TamerDB(dbname)
    db.rebuild_schema_mapping_models()
    db.schema_map_source(sid)
    field_mappings = db.get_field_mappings_by_source(sid)
    attr_list = sorted(field_mappings.values(), key=lambda f: f['match']['score'], reverse=True)
    return render(req, 'tamer/match-rows.html', {'attr_list': attr_list})
예제 #2
0
파일: views.py 프로젝트: RoyFangQi/doit
def schema_map_source(req, dbname, sid):
    db = TamerDB(dbname)
    db.rebuild_schema_mapping_models()
    db.schema_map_source(sid)
    redirect_url = '/doit/' + dbname + '/sources/' + sid + '/map'
    return HttpResponse(simplejson.dumps({'redirect': redirect_url}),
                        mimetype='application/json')
예제 #3
0
def schema_map_source(req, dbname, sid):
    db = TamerDB(dbname)
    db.rebuild_schema_mapping_models()
    db.schema_map_source(sid)
    redirect_url = '/doit/' + dbname + '/sources/' + sid + '/map'
    return HttpResponse(simplejson.dumps({'redirect': redirect_url}),
                        mimetype='application/json')