You can use select * from pg_tables;get a list of tables, although you probably want to exclude where schemaname <> 'pg_catalog'...
Based on another one of your last questions, if you are trying to just drop all your django stuff, but don’t have permission to delete the database, you can just MAKE SURE the Django has it all?
Also use CASCADE on your frame .
EDIT: can you select * from information_schema.tables;?
EDIT: row[2] row[0], , WHERE schemaname = 'my_django_schema_here'.
EDIT: SELECT table_name from pg_tables where schemaname = 'my_django_schema_here'; row[0]