我正在尝试移动用 Django 1.3 制作的网站。
服务器设置为私人服务器(我认为是这样)。
安装 Django 后,我将所有文件移动到新服务器,我交换了设置文件,所以现在设置中的文件来自 privies 服务器。我在设置中更改了文件位置,所以现在所有文件都指向缝纫服务器位置。我安装的一些模块也丢失了,我没有收到缺少 django 模块的错误。
当我尝试在互联网上设置可见时,出现以下错误:
[root@575283 somod]# python manage.py runserver 0.0.0.0:8000
Traceback (most recent call last):
File "manage.py", line 13, in <module>
execute_manager(settings)
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 209, in execute
translation.activate('en-us')
File "/usr/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 100, in activate
return _trans.activate(language)
File "/usr/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 202, in activate
_active.value = translation(language)
File "/usr/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 185, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/usr/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 162, in _fetch
app = import_module(appname)
File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/usr/lib/python2.6/site-packages/sorl_thumbnail-11.12-py2.6.egg/sorl/thumbnail/__init__.py", line 1, in <module>
from sorl.thumbnail.fields import ImageField
File "/usr/lib/python2.6/site-packages/sorl_thumbnail-11.12-py2.6.egg/sorl/thumbnail/fields.py", line 2, in <module>
from django.db import models
File "/usr/lib/python2.6/site-packages/django/db/__init__.py", line 78, in <module>
connection = connections[DEFAULT_DB_ALIAS]
File "/usr/lib/python2.6/site-packages/django/db/utils.py", line 93, in __getitem__
backend = load_backend(db['ENGINE'])
File "/usr/lib/python2.6/site-packages/django/db/utils.py", line 33, in load_backend
return import_module('.base', backend_name)
File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/usr/lib/python2.6/site-packages/django/db/backends/mysql/base.py", line 14, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
我猜我错过了 MySQLdb 模块,有什么提示吗?
还有其他输出线呢?
旧服务器有 Django 1.3
我正在使用 CentOS 6、Apache 2、Django 1.3.1、mod_wsgi、Python 2.6.6