Created
October 20, 2016 16:23
-
-
Save python-consulting/1a9dd5d1fa59a7c1ff5fde9b71e46e7f to your computer and use it in GitHub Desktop.
Django dynamic import of model from app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.apps import apps | |
app_config = apps.get_app_config('mainApp') | |
LogLine = app_config.get_model('ModelName') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment