Example #1
0
def jpost_designtags():
    jdesign = flask.request.get_json()
    newdesigntags = put_designtags(jdesign)
    return flask.json.jsonify({
        'design': dict(newdesigntags),
        'tags': design.AllTags()
    })
Example #2
0
def fpost_designtags():
    if PY3:
        fdesign = dict(flask.request.form.items())
    else:
        fdesign = dict(flask.request.form.iteritems())
    if 'tags' in fdesign:
        fdesign['tags'] = fdesign['tags'].split(u' ')
    newdesigntags = put_designtags(fdesign)
    return flask.json.jsonify({
        'design': dict(newdesigntags),
        'tags': design.AllTags()
    })
Example #3
0
def get_tags():
    return flask.json.jsonify({'tags': design.AllTags()})