from modue_name import *
,表示导入模块名中的所有子模块。
ls /usr/local/lib/python3.5/dist-packages/django
apps contrib dispatch __init__.py __pycache__ templatetags utils
bin core forms __main__.py shortcuts.py test views
conf db http middleware template urls
子模块
apps
位于
django
import django
from django import *
print(django.apps)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'django' has no attribute 'apps'
为什么是子模块
应用程序
from django import *
?