Skip to content

Instantly share code, notes, and snippets.

@charettes
Created April 21, 2016 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charettes/b5647f5ff2ae8cf9c7f74da50629f771 to your computer and use it in GitHub Desktop.
Save charettes/b5647f5ff2ae8cf9c7f74da50629f771 to your computer and use it in GitHub Desktop.
# Add the common tests module as an application to allow its models
# table to be created even if they are not part of the common migations.
app_config = AppConfig.create(__package__)
app_config.label = 'common_tests'
app_config.import_models(apps.all_models[app_config.label])
apps.app_configs[app_config.label] = app_config
apps.clear_cache()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment