summaryrefslogtreecommitdiff
path: root/django/db/models/fields
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2010-06-09 16:23:26 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2010-06-09 16:23:26 +0000
commitfe2bd63e376d3d783cced66bb68de5dc878fadde (patch)
tree3af2efd98f757abe3d54d7d17db8789c6f34b5a1 /django/db/models/fields
parent9142ba5c4c7a59bb6e2acd5f940b896906272584 (diff)
[soc2010/query-refactor] MongoDB backend can now update saved objects.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/fields')
-rw-r--r--django/db/models/fields/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index 0c9b603609..d6da57b467 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -215,6 +215,8 @@ class Field(object):
# mapped to one of the built-in Django field types. In this case, you
# can implement db_type() instead of get_internal_type() to specify
# exactly which wacky database column type you want to use.
+ if not getattr(connection.features, "typed_columns", True):
+ return None
data = DictWrapper(self.__dict__, connection.ops.quote_name, "qn_")
try:
return connection.creation.data_types[self.get_internal_type()] % data