def create_user(user_name, password, is_admin): db = DBHelper() value = (user_name, md5(password).hexdigest(), is_admin) return db.insert("user", ("user_name", "password", "is_admin"), (value,))
def publish_blog(title, content): d = DBHelper() return d.insert(TABLE_NAME, ("title", "content", "is_show"), ((title, content, True),))
def add_todo(text): print "todo" db = DBHelper() db.insert("todo", ("text", "status"), ((text, 1),))