Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix Python 3 support

  • Loading branch information...
commit 904b82759cce6f85d06564c42123da030da52341 1 parent 48dd1e6
@andrewgodwin andrewgodwin authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/fields/related.py
View
4 django/db/models/fields/related.py
@@ -1166,7 +1166,7 @@ def deconstruct(self):
rel = self.rel
if self.rel.field_name:
kwargs['to_field'] = self.rel.field_name
- if isinstance(self.rel.to, basestring):
+ if isinstance(self.rel.to, six.string_types):
kwargs['to'] = self.rel.to
else:
kwargs['to'] = "%s.%s" % (self.rel.to._meta.app_label, self.rel.to._meta.object_name)
@@ -1393,7 +1393,7 @@ def deconstruct(self):
del kwargs['help_text']
# Rel needs more work.
rel = self.rel
- if isinstance(self.rel.to, basestring):
+ if isinstance(self.rel.to, six.string_types):
kwargs['to'] = self.rel.to
else:
kwargs['to'] = "%s.%s" % (self.rel.to._meta.app_label, self.rel.to._meta.object_name)
Please sign in to comment.
Something went wrong with that request. Please try again.