summaryrefslogtreecommitdiff
path: root/django/db/backends/sqlite3/base.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-18 22:36:31 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-18 22:36:31 +0000
commit436ef181f33397a8c55fd3b626065a31cbc8d844 (patch)
tree831749f1e1407cf941495b6779ed5359f6997eb3 /django/db/backends/sqlite3/base.py
parent13643a7f5ded088b870b878712f0f4f39f213e52 (diff)
Fixed #5552 -- Raise an error, rather than failing silently, when DATABASE_NAME
is not specified for SQLite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/sqlite3/base.py')
-rw-r--r--django/db/backends/sqlite3/base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index 5cb21f5e3b..48d9ad4c4b 100644
--- a/django/db/backends/sqlite3/base.py
+++ b/django/db/backends/sqlite3/base.py
@@ -110,6 +110,9 @@ class DatabaseWrapper(BaseDatabaseWrapper):
def _cursor(self, settings):
if self.connection is None:
+ if not settings.DATABASE_NAME:
+ from django.core.exceptions import ImproperlyConfigured
+ raise ImproperlyConfigured, "Please fill out DATABASE_NAME in the settings module before using the database."
kwargs = {
'database': settings.DATABASE_NAME,
'detect_types': Database.PARSE_DECLTYPES | Database.PARSE_COLNAMES,