I've attached a patch for implementation of get_table_list() for SQLite3 in django/core/db/backends/sqlite3.py
I'm not sure if any Unicode issues are to be taken care of.
Index: sqlite3.py
===================================================================
--- sqlite3.py (revision 618)
+++ sqlite3.py (working copy)
@@ -119,7 +119,13 @@
return "%i-%02i-%02i 00:00:00" % (dt.year, dt.month, dt.day)
def get_table_list(cursor):
- raise NotImplementedError
+ '''See http://www.sqlite.org/faq.html#q9 on how to list all tables in a SQLite database.'''
+ cursor.execute('''
+ SELECT name FROM sqlite_master
+ WHERE type='table'
+ ORDER BY name
+ ''')
+ return [row[0] for row in cursor.fetchall()]
def get_relations(cursor, table_name):
raise NotImplementedError
Thanks!
Swaroop
www.swaroopch.info