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))
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})
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))
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})