mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
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
This commit is contained in:
parent
15497eee00
commit
ca1281330a
@ -110,6 +110,9 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
|||||||
|
|
||||||
def _cursor(self, settings):
|
def _cursor(self, settings):
|
||||||
if self.connection is None:
|
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 = {
|
kwargs = {
|
||||||
'database': settings.DATABASE_NAME,
|
'database': settings.DATABASE_NAME,
|
||||||
'detect_types': Database.PARSE_DECLTYPES | Database.PARSE_COLNAMES,
|
'detect_types': Database.PARSE_DECLTYPES | Database.PARSE_COLNAMES,
|
||||||
|
@ -484,9 +484,7 @@ class Model(object):
|
|||||||
if isinstance(raw_field, dict):
|
if isinstance(raw_field, dict):
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
message = "Representing uploaded files as dictionaries is"\
|
message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
|
||||||
" deprecated. Use django.core.files.SimpleUploadedFile"\
|
|
||||||
" instead.",
|
|
||||||
category = DeprecationWarning,
|
category = DeprecationWarning,
|
||||||
stacklevel = 2
|
stacklevel = 2
|
||||||
)
|
)
|
||||||
@ -496,9 +494,7 @@ class Model(object):
|
|||||||
elif isinstance(raw_field, basestring):
|
elif isinstance(raw_field, basestring):
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
message = "Representing uploaded files as strings is "\
|
message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
|
||||||
" deprecated. Use django.core.files.SimpleUploadedFile "\
|
|
||||||
" instead.",
|
|
||||||
category = DeprecationWarning,
|
category = DeprecationWarning,
|
||||||
stacklevel = 2
|
stacklevel = 2
|
||||||
)
|
)
|
||||||
|
@ -442,9 +442,7 @@ class FileField(Field):
|
|||||||
# We warn once, then support both ways below.
|
# We warn once, then support both ways below.
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
message = "Representing uploaded files as dictionaries is"\
|
message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
|
||||||
" deprecated. Use django.core.files.SimpleUploadedFile "\
|
|
||||||
" instead.",
|
|
||||||
category = DeprecationWarning,
|
category = DeprecationWarning,
|
||||||
stacklevel = 2
|
stacklevel = 2
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user