问题
I've done some monkeypatching to some third-party apps in my custom Django 1.10 app, and now, when I try to create an initial migration, it also generates migrations for these external apps, but it puts those migrations in my virtualenv's site-packages directory, where they can't be version controlled.
Moreover, the monkeypatching doesn't actually change the schema. I'm just changing the verbose name and help text to be more user-friendly. There are no changes being made to the database, so there's no actual need to generate migrations for them. How do I generate my app's migration without generating them for external apps?
I tried deleting them, and removing them from my app's migration's dependencies list, but then my unittests won't run and I get the error:
django.db.migrations.exceptions.InvalidBasesError: Cannot resolve bases for...
来源:https://stackoverflow.com/questions/40597152/how-to-add-custom-migrations-to-external-django-apps