【发布时间】:2012-12-19 07:04:30
【问题描述】:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'djangodb',
'USER': 'root',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
我现在创建了一个数据库 djangodb 尝试创建表 用这个命令
./manage.py syncdb
我希望得到
Creating table auth_message
Creating table auth_group
Creating table auth_user
Creating table auth_permission
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table blog_blogpost
但我收到此错误:
django.core.exceptions.ImproperlyConfigured: Error loading MySqldb module: no module named MySqldb
我什至尝试建立一个主机 127.0.0.1 。谁能弄清楚发生了什么。
【问题讨论】:
标签: python mysql django python-module