def jpost_designtags(): jdesign = flask.request.get_json() newdesigntags = put_designtags(jdesign) return flask.json.jsonify({ 'design': dict(newdesigntags), 'tags': design.AllTags() })
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() })
def get_tags(): return flask.json.jsonify({'tags': design.AllTags()})