def sequence_list(self):
    'Returns a list of information about all DB sequences for all models in all apps.'
    from django.db import models, router
    apps = models.get_apps()
    sequence_list = []
    for app in apps:
        for model in models.get_models(app):
            if (not model._meta.managed):
                continue
            if (not router.allow_syncdb(self.connection.alias, model)):
                continue
            for f in model._meta.local_fields:
                if isinstance(f, models.AutoField):
                    sequence_list.append({'table': model._meta.db_table, 'column': f.column})
                    break
            for f in model._meta.local_many_to_many:
                if (f.rel.through is None):
                    sequence_list.append({'table': f.m2m_db_table(), 'column': None})
    return sequence_list
Returns a list of information about all DB sequences for all models in all apps.
def sequence_list(self):
    
    from django.db import models, router
    apps = models.get_apps()
    sequence_list = []
    for app in apps:
        for model in models.get_models(app):
            if (not model._meta.managed):
                continue
            if (not router.allow_syncdb(self.connection.alias, model)):
                continue
            for f in model._meta.local_fields:
                if isinstance(f, models.AutoField):
                    sequence_list.append({'table': model._meta.db_table, 'column': f.column})
                    break
            for f in model._meta.local_many_to_many:
                if (f.rel.through is None):
                    sequence_list.append({'table': f.m2m_db_table(), 'column': None})
    return sequence_list