Author: mtredinnick
Date: 2008-07-18 17:36:31 -0500 (Fri, 18 Jul 2008)
New Revision: 7956

Modified:
   django/trunk/django/db/backends/sqlite3/base.py
Log:
Fixed #5552 -- Raise an error, rather than failing silently, when DATABASE_NAME
is not specified for SQLite.


Modified: django/trunk/django/db/backends/sqlite3/base.py
===================================================================
--- django/trunk/django/db/backends/sqlite3/base.py     2008-07-18 21:45:25 UTC 
(rev 7955)
+++ django/trunk/django/db/backends/sqlite3/base.py     2008-07-18 22:36:31 UTC 
(rev 7956)
@@ -110,6 +110,9 @@
 
     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,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to