예제 #1
0
파일: app.py 프로젝트: rweait/changemonger
def display_way():
    if request.args.has_key("id"):
        id = request.args["id"]
        ele = helpers.get_way_or_404(id)
        features = changemonger.features(ele)
        return render_template("way_details.haml", name=display_name(ele, features[0]), element=ele, features=features)
    else:
        return render_template("way.haml", title="Bad Way")
예제 #2
0
def display_relation():
    if request.args.has_key('id'):
        id = request.args['id']
        ele = helpers.get_relation_or_404(id)
        features = changemonger.features(ele)
        return render_template('relation_details.haml',
                               name=display_name(ele, features[0]),
                               element=ele,
                               features=features)
    else:
        return render_template('relation.haml', title="Bad Way")
예제 #3
0
파일: app.py 프로젝트: emacsen/changemonger
def display_relation():
    if request.args.has_key('id'):
        id = request.args['id']
        ele = helpers.get_relation_or_404(id)
        features = changemonger.features(ele)
        return render_template('relation_details.haml',
                               name = display_name(ele, features[0]),
                               element = ele,
                               features = features)
    else:
        return render_template('relation.haml', title="Bad Way")
예제 #4
0
파일: app.py 프로젝트: gioele/changemonger
def display_node():
    if request.args.has_key('id'):
        id = request.args['id']
        ele = helpers.get_node_or_404(id)
        features = changemonger.features(ele)
        return render_template('node_details.haml',
                               name = display_name(ele, features[0]),
                               node = ele,
                               features = features)
    else:
        return render_template('node.haml', title="Bad Node")
예제 #5
0
def api_relation(id):
    ele = helpers.get_relation_or_404(id)
    features = changemonger.features(ele)
    features_names = [f.name for f in features]
    return jsonify(cn=common_name(ele), features=features_names)
예제 #6
0
파일: app.py 프로젝트: emacsen/changemonger
def api_relation(id):
    ele = helpers.get_relation_or_404(id)
    features = changemonger.features(ele)
    features_names = [f.name for f in features]
    return jsonify(cn=common_name(ele),
                   features=features_names)