首页 > Django 配置Apache出现错误?

Django 配置Apache出现错误?

在配置好Apche时候重启报错:

错误码

root@iZ28n0rfnpyZ:/etc/apache2/sites-available# /etc/init.d/apache2 restart

[Tue Mar 22 16:40:39.420386 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 198, in import_models
[Tue Mar 22 16:40:39.420461 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] self.models_module = import_module(models_module_name)
[Tue Mar 22 16:40:39.420474 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Tue Mar 22 16:40:39.420521 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] __import__(name)
[Tue Mar 22 16:40:39.420533 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] File "/home/blog/home/models.py", line 8, in <module>
[Tue Mar 22 16:40:39.420616 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] from mptt.fields import TreeForeignKey
[Tue Mar 22 16:40:39.420638 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] ImportError: No module named mptt.fields
[Tue Mar 22 16:43:42.124421 2016] [mpm_event:notice] [pid 13248:tid 140414048438144] AH00491: caught SIGTERM, shutting down
[Tue Mar 22 16:43:43.131020 2016] [mpm_event:notice] [pid 13388:tid 140027491424128] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Mar 22 16:43:43.131135 2016] [core:notice] [pid 13388:tid 140027491424128] AH00094: Command line: '/usr/sbin/apache2'
root@iZ28n0rfnpyZ:/etc/apache2/sites-available#

服务器配置

ubuntun11.4+mysql+apache

我是看这篇文章在配置

http://www.ziqiangxuetang.com/django/django-deploy.html

当时域名还没有的时候用IP是正常的


确认 mptt 已安装且在搜索路径中

【热门文章】
【热门文章】