def edit_contact(entry_id, contact): """Edits a contact. Keyword arguments: entry_id -- rowid for contact entry contact -- List containing contact entry information """ db.edit_entry(entry_id, contact)
def edit(id): is_login() post = db.view_post(id) if request.method == 'POST': title = request.form['title'] content = request.form['content'] tags = request.form['tags'] db.edit_entry(id, title, content, tags) return redirect(url_for('index')) return render_template('edit.html', post=post)
def edit(): if not request.json: return json.dumps({"result": "error"}) print request.json if edit_entry(request.json['id'], request.json['text']) == True: return json.dumps({"result": "success"}) else: return json.dumps({"result": "error"})
def edit_contact(entry_id, contact): """Edits a contact""" db.edit_entry(entry_id, contact)