allow custom app label for ForeignKey

This commit is contained in:
Maxim Kurnikov
2019-07-20 22:50:37 +03:00
parent fa57fb0cbf
commit b86d33c718
2 changed files with 30 additions and 0 deletions

View File

@@ -50,6 +50,9 @@ def initialize_django(settings_module: str) -> Tuple['Apps', 'LazySettings']:
apps.get_models.cache_clear()
apps.get_swappable_settings_name.cache_clear()
if not settings.configured:
settings._setup()
apps.populate(settings.INSTALLED_APPS)
assert apps.apps_ready