def find_django_migrations_module(module_name):
    import imp
    try:
        module_info = imp.find_module(module_name)
        module = imp.load_module(module_name, *module_info)
        imp.find_module('migrations_django', module.__path__)
        return module_name + '.migrations_django'
    except ImportError:
        return module_name + '.migrations'  # conforms to Django 1.7 defaults
Tries to locate <module_name>.migrations_django (without actually importing it).
dataset/ETHPy150Open jrief/djangocms-cascade/examples/bs3demo/utils.py/find_django_migrations_module