def installed_models(self, tables):
    'Returns a set of all models represented by the provided list of table names.'
    from django.db import models, router
    all_models = []
    for app in models.get_apps():
        for model in models.get_models(app):
            if router.allow_syncdb(self.connection.alias, model):
                all_models.append(model)
    return set([m for m in all_models if (self.table_name_converter(m._meta.db_table) in map(self.table_name_converter, tables))])
Returns a set of all models represented by the provided list of table names.
def installed_models(self, tables):
    
    from django.db import models, router
    all_models = []
    for app in models.get_apps():
        for model in models.get_models(app):
            if router.allow_syncdb(self.connection.alias, model):
                all_models.append(model)
    return set([m for m in all_models if (self.table_name_converter(m._meta.db_table) in map(self.table_name_converter, tables))])