我试图移动Django 1. 3所建立的网站。
服务器被设置为 Privits 之一( 我想是的 ) 。
After Django installation, I moved all files to new server, I swap settings files so now in settings are files from the privies server. I changed files locations in setting, so right now all are pointed to sew server location. Also some modules was missing which I install and I don’t get errors with missing django modules.
当我试图在互联网上显示时, 我就会发现以下错误:
[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 模块, 有没有提示?
其他产出线呢?
Old server has Django 1.3
I m using CentOS 6, Apache 2, Django 1.3.1, mod_wsgi, Python 2.6.6