summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Dobrawy <ad-m@users.noreply.github.com>2016-06-29 01:31:27 +0200
committerTim Graham <timograham@gmail.com>2016-07-01 13:12:27 -0400
commit92d323ccb5239e3f04b6cb749521fffa71318923 (patch)
treea4048322ac4610376fecd9b5e64b7a252ed54299
parent5f8da229847e1da4cb8284d1e10b00694d351080 (diff)
Added package names to 'Error loading MySQLdb module' error.
-rw-r--r--django/db/backends/mysql/base.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 761e5faaff..524e90d6eb 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -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