在Django上创建新应用程序的麻烦

时间:2017-01-13 15:50:23

标签: python django

我是编程和Django的新手。我开始关注带有Django教程的Tango,我正在通过在“INSTALLED_APPS”元组下的“settings.py”中键入“rango”创建一个名为“rango”的新应用程序。我按照说明尝试在命令提示符下运行服务器。我收到了以下错误

C:\Python34\Scripts\tango_with_django_project> python manage.py startapp rango
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\django\apps\config.py", line 118, in  create
cls = getattr(mod, cls_name)
AttributeError: 'module' object has no attribute 'staticfilesrango'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line 367, in execute_from_command_line
utility.execute()
File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line 341, in execute
django.setup()
File "C:\Python34\lib\site-packages\django\__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Python34\lib\site-packages\django\apps\registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "C:\Python34\lib\site-packages\django\apps\config.py", line 123, in create
import_module(entry)
File "C:\Python34\lib\importlib\__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
ImportError: No module named 'django.contrib.staticfilesrango'

我已经在visual studio和pycharm上尝试了这个,在python3.5和3.4上尝试过,卸载并重新安装了python,并重新启动了pip install和django。请帮忙!

0 个答案:

没有答案