Import all modules in django
In django is there way to import all modules
ex: from project.models import *
ex: from project1.models import *开发者_运维问答
Can this be done with one statement
If you just want to do this when testing things in the shell, look into the shell_plus
command provided by the django-extensions project.
This is a really neat extension, which starts a shell and automatically loads all the models in your project when you do ./manage.py shell_plus
from the command line.
精彩评论