mtre...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed f580a3e

Fixed #5552 -- Raise an error, rather than failing silently, when DATABASE_NAME
is not specified for SQLite.

  • Participants
  • Parent commits 3664e09
  • Branches default

Comments (0)

Files changed (1)

File django/db/backends/sqlite3/

     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,