summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2008-07-18 23:01:28 +0000
committerBrian Rosner <brosner@gmail.com>2008-07-18 23:01:28 +0000
commitca1281330a727bfd98a3902f906b27afbbaad703 (patch)
tree73bbde561bf6417f116d30f1d5dd8435bec0ba79 /django
parent15497eee00cc4c1712796bec74236c41d94604bc (diff)
newforms-admin: Merged from trunk up to [7956].
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/sqlite3/base.py3
-rw-r--r--django/db/models/base.py8
-rw-r--r--django/newforms/fields.py4
3 files changed, 6 insertions, 9 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,
diff --git a/django/db/models/base.py b/django/db/models/base.py
index 92519f7003..e2ba49ee8c 100644
--- a/django/db/models/base.py
+++ b/django/db/models/base.py
@@ -484,9 +484,7 @@ class Model(object):
if isinstance(raw_field, dict):
import warnings
warnings.warn(
- message = "Representing uploaded files as dictionaries is"\
- " deprecated. Use django.core.files.SimpleUploadedFile"\
- " instead.",
+ message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
category = DeprecationWarning,
stacklevel = 2
)
@@ -496,9 +494,7 @@ class Model(object):
elif isinstance(raw_field, basestring):
import warnings
warnings.warn(
- message = "Representing uploaded files as strings is "\
- " deprecated. Use django.core.files.SimpleUploadedFile "\
- " instead.",
+ message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
category = DeprecationWarning,
stacklevel = 2
)
diff --git a/django/newforms/fields.py b/django/newforms/fields.py
index bfff9fe8b0..77bd8cbe94 100644
--- a/django/newforms/fields.py
+++ b/django/newforms/fields.py
@@ -442,9 +442,7 @@ class FileField(Field):
# We warn once, then support both ways below.
import warnings
warnings.warn(
- message = "Representing uploaded files as dictionaries is"\
- " deprecated. Use django.core.files.SimpleUploadedFile "\
- " instead.",
+ message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
category = DeprecationWarning,
stacklevel = 2
)