def django_table_names(self, only_existing=False):
        from django.db import models
        tables = set()
        for app in models.get_apps():
            for model in models.get_models(app):
                tables.add(model._meta.db_table)
                tables.update([f.m2m_db_table() for f in model._meta.local_many_to_many])
        if only_existing:
            tables = [t for t in tables if t in self.table_names()]
        return tables
Returns a list of all table names that have associated Django models and
dataset/ETHPy150Open dcramer/django-compositepks/django/db/backends/__init__.py/BaseDatabaseIntrospection.django_table_names