开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜