def newBookmark(song_id=None): e = Event('web.content.newBookmark') bk = Bookmark() t = request.form['title'] b = request.form['b'] bn = request.form['bn'] k = request.form['k'] user = get_user_name(k) url = request.form['url'] tags = [] if 'tags' in request.form: tags = request.form['tags'] bk_id = bk.insert(b, user, url, t, bn, tags) e.save() return jsonify({'result': str(bk_id)})
def test_findByUrl(self): url ='https://github.com/buymeasoda/soda-theme' bk = Bookmark() bkid = bk.findByUrl(url) print bk.id