Exemplo n.º 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})
Exemplo n.º 2
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')
Exemplo n.º 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')