summaryrefslogtreecommitdiff
path: root/django/db/models/fields
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-07-01 12:02:17 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-07-01 12:02:17 +0200
commitd5589b4cd3238c4bf4063ddd8239d22b37caa7d3 (patch)
tree34a10064e210d88a65ef1203a7c00af971a8e467 /django/db/models/fields
parenta763915a03579868c6abdc5cdffbb4c398dc52ee (diff)
Removed some conditional code only needed under Python 2.6.
Diffstat (limited to 'django/db/models/fields')
-rw-r--r--django/db/models/fields/related.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index ff222e1b85..1e7e73ddbe 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -1362,9 +1362,7 @@ class ManyToManyField(RelatedField):
assert not to._meta.abstract, "%s cannot define a relation with abstract class %s" % (self.__class__.__name__, to._meta.object_name)
except AttributeError: # to._meta doesn't exist, so it must be RECURSIVE_RELATIONSHIP_CONSTANT
assert isinstance(to, six.string_types), "%s(%r) is invalid. First parameter to ManyToManyField must be either a model, a model name, or the string %r" % (self.__class__.__name__, to, RECURSIVE_RELATIONSHIP_CONSTANT)
- # Python 2.6 and earlier require dictionary keys to be of str type,
- # not unicode and class names must be ASCII (in Python 2.x), so we
- # forcibly coerce it here (breaks early if there's a problem).
+ # Class names must be ASCII in Python 2.x, so we forcibly coerce it here to break early if there's a problem.
to = str(to)
kwargs['verbose_name'] = kwargs.get('verbose_name', None)