“No installed app with label 'admin'” running Django migration. The app is installed correctly
问题 I am trying to use admin.LogEntry objects during a datamigration on Django 1.7 The 'django.contrib.admin' app is listed on INSTALLED_APPS . On the shell, it works: >>> from django.apps import apps >>> apps.get_model('admin', 'LogEntry') django.contrib.admin.models.LogEntry But during the migration, it fails: def do_it(apps, schema_editor): LogEntry = apps.get_model('admin', 'LogEntry') Fails like this: django-admin migrate (...) LookupError: No installed app with label 'admin'. Using a