2
我知道這個問題之前已經被問過了,但是在看過之後,我不禁感到我錯過了一些東西。Django沒有名爲utils的模塊
所以我以前有一個問題,得到django壓縮機安裝,但經過一番苦苦掙扎,我設法得到它安裝。當我運行我的Django應用程序,雖然它在我的manage.py停在execute_from_command_line(sys.argv)
並拋出這個錯誤:
Traceback (most recent call last):
File "C:\Users\PCDOM\Desktop\Power\pm_app\manage.py", line
17, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\PCDOM\Desktop\Power\pm_app\env\lib\site-pac
kages\django\core\management\__init__.py", line 385, in execute_from_command_lin
e
utility.execute()
File "C:\Users\PCDOM\Desktop\Power\pm_app\env\lib\site-pac
kages\django\core\management\__init__.py", line 354, in execute
django.setup()
File "C:\Users\PCDOM\Desktop\Power\pm_app\env\lib\site-pac
kages\django\__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\PCDOM\Desktop\Power\pm_app\env\lib\site-pac
kages\django\apps\registry.py", line 108, in populate
app_config.import_models(all_models)
File "C:\Users\PCDOM\Desktop\Power\pm_app\env\lib\site-pac
kages\django\apps\config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "C:\Python27\Lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Users\PCDOM\Desktop\Power\pm_app\env\lib\site-pac
kages\compressor\models.py", line 1, in <module>
from compressor.conf import CompressorConf # noqa
File "C:\Users\PCDOM\Desktop\Power\pm_app\env\lib\site-pac
kages\compressor\conf.py", line 5, in <module>
from django.template.utils import InvalidTemplateEngineError
ImportError: No module named utils
所以,當我進去的目錄看,我無法找到一個utils.py文件。這不是假設成爲django包的一部分嗎?由於我錯過了那個文件,有沒有不正確的安裝?
您使用的是什麼版本的Django?它似乎出現在1.9 – bernie
使用1.7.4在我的虛擬env – john
它看起來像它是新的1.8 – bernie