コード例 #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_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")
コード例 #3
0
ファイル: app.py プロジェクト: gioele/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]),
                               node = ele,
                               features = features)
    else:
        return render_template('way.haml', title="Bad Way")
コード例 #4
0
def api_way(id):
    ele = helpers.get_way_or_404(id)
    features = changemonger.features(ele)
    features_names = [f.name for f in features]
    return jsonify(cn=common_name(ele), features=features_names)
コード例 #5
0
ファイル: app.py プロジェクト: emacsen/changemonger
def api_way(id):
    ele = helpers.get_way_or_404(id)
    features = changemonger.features(ele)
    features_names = [f.name for f in features]
    return jsonify(cn=common_name(ele),
                   features=features_names)