Re: mod_wsgi cannot load MySQLdb

2011-08-24 Thread Jianbao Tao
BTW, the virtualenv uses python2.7 On Wed, Aug 24, 2011 at 6:54 PM, Jianbao Tao wrote: > Thanks, Tom, Reinout. > > I think I forgot to mention the configuration of my machine. Here it is. > >- Mac OS Snow Leopard 10.6.8 >- mysql-5.5.14-osx10.6-x86_64 >- Apac

Re: mod_wsgi cannot load MySQLdb

2011-08-24 Thread Jianbao Tao
Thanks, Tom, Reinout. I think I forgot to mention the configuration of my machine. Here it is. - Mac OS Snow Leopard 10.6.8 - mysql-5.5.14-osx10.6-x86_64 - Apache2 (shipped with OSX) - mod_wsgi 3.3 And here is some additional information that may help. >$ file /usr/libexec/apache2/m

Re: Problems on using multiple databases

2011-08-24 Thread Jianbao Tao
Reinout, Thanks so much for your help. I think I have figured out the solution. I posted it on https://groups.google.com/forum/?hl=en#!topic/django-users/zwMWNdIqB3A. Please take a look. Jianbao On Wed, Aug 24, 2011 at 10:13 AM, Reinout van Rees wrote: > On 24-08-11 17:57, Jianbao Tao wr

Re: Problems on using multiple databases

2011-08-24 Thread Jianbao Tao
Thank you, Reinout. I changed the definition of 'allow_syncdb' to the following: def allow_syncdb(self, db, model): # db is a string of database name. label = model._meta.app_label if label == 'books': dbName = 'test' else: dbName = None

Re: mod_wsgi cannot load MySQLdb

2011-08-24 Thread Jianbao Tao
Sorry, I pasted the 'python django.wsgi' output in a wrong place. On Wed, Aug 24, 2011 at 9:12 AM, Jianbao Tao wrote: > Thank you, Reinout. > > I don't know which version of python mod_wsgi uses. Here is a list of > python versions on my machine. > > /Li

Re: mod_wsgi cannot load MySQLdb

2011-08-24 Thread Jianbao Tao
Thank you, Reinout. I don't know which version of python mod_wsgi uses. Here is a list of python versions on my machine. /Library/Frameworks/Python.framework//Versions/2.7/bin/python /usr/bin/python2.5 /usr/bin/python2.6 /usr/bin/pythonw2.5 /usr/bin/pythonw2.6 /usr/local/bin/python /usr/loc