Ejemplo n.º 1
0
def publish():
    code = request.form['code']
    uid = request.form['uid']
    lang = request.form['lang']
    updateCode(uid, code, lang)
    return redirect("{}{}/{}".format(request.host_url, request.form['submit'],
                                     uid))
Ejemplo n.º 2
0
def publish():
    content = request.form.get('content')
    uid = request.form.get('uid')
    language = request.form.get('language')

    # code = Code(uid=uid, content=content, language=language)

    updateCode(uid, content, language)
    return jsonify({'ok': True})
Ejemplo n.º 3
0
def publish():
    code = request.form['code']
    uid = request.form['uid']
    language = request.form['language']

    updateCode(uid, code, language)
    createEdition(uid, request.remote_addr, request.user_agent.string)

    return redirect("{}{}/{}".format(request.host_url, request.form['submit'],
                                     uid))
Ejemplo n.º 4
0
def publish():
    content = request.form['content']
    uid = request.form['uid']
    language = request.form['language']

    updateCode(uid, content, language)
    createLog(request.remote_addr, request.user_agent.string)
    result = getCode(uid)

    return jsonify({'ok': True, 'code': result})