Use bootstrap-table for fancy ajax tables.

This commit is contained in:
2019-08-18 23:55:59 +02:00
parent 41b2aa2ed1
commit 3ed8146b6f
11 changed files with 161 additions and 117 deletions

View File

@ -74,6 +74,7 @@ def create_done_song_view():
def get_list():
conn = open_db()
conn.row_factory = sqlite3.Row
cur = conn.cursor()
cur.execute("SELECT * FROM Liste")
return cur.fetchall()
@ -141,6 +142,20 @@ def delete_entry(id):
return True
def delete_entries(ids):
idlist = []
for x in ids:
idlist.append( (x,) )
try:
conn = open_db()
cur = conn.cursor()
cur.executemany("DELETE FROM entries WHERE id=?", idlist)
conn.commit()
conn.close()
return cur.rowcount
except sqlite3.Error as error:
return -1
def delete_all_entries():
conn = open_db()
cur = conn.cursor()