Solve the problem of sorting after SQLite auto-increment ID modification:
import sqlite3 import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) db_path=os.path.join(BASE_DIR, 'db.sqlite3') print (db_path) def del_pro_db(del_id): """Connects to the specific database.""" conn = sqlite3.connect(db_path) c = conn.cursor() q = 'update MyApp_db_project set id=id-1 where id>'+str(del_id) c.execute(q) conn.commit() return conn def find_max_id(): con... »