mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Added package names to 'Error loading MySQLdb module' error.
This commit is contained in:
parent
5f8da22984
commit
92d323ccb5
1 changed files with 4 additions and 1 deletions
|
@ -25,7 +25,10 @@ try:
|
|||
import MySQLdb as Database
|
||||
except ImportError as e:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
|
||||
raise ImproperlyConfigured(
|
||||
'Error loading MySQLdb module: %s.\n'
|
||||
'Did you install mysqlclient or MySQL-python?' % e
|
||||
)
|
||||
|
||||
from MySQLdb.constants import CLIENT, FIELD_TYPE # isort:skip
|
||||
from MySQLdb.converters import Thing2Literal, conversions # isort:skip
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue