              kwargs['related_name'] = self.remote_field.related_name
          if self.remote_field.related_query_name is not None:
              kwargs['related_query_name'] = self.remote_field.related_query_name
          # Rel needs more work.
          if isinstance(self.remote_field.model, six.string_types):
              kwargs['to'] = self.remote_field.model
          else:
              kwargs['to'] = "%s.%s" % (
                  self.remote_field.model._meta.app_label,
                  self.remote_field.model._meta.object_name,
 
</s> remove         if isinstance(self.remote_field.model, six.string_types):
 </s> add         if isinstance(self.remote_field.model, str): </s> remove             if isinstance(self.remote_field.through, six.string_types):
 </s> add             if isinstance(self.remote_field.through, str): </s> remove                 not isinstance(self.remote_field.model, six.string_types) and
 </s> add                 not isinstance(self.remote_field.model, str) and </s> remove         rel_is_string = isinstance(self.remote_field.model, six.string_types)
 </s> add         rel_is_string = isinstance(self.remote_field.model, str) </s> remove             if isinstance(self.remote_field.model, six.string_types):
 </s> add             if isinstance(self.remote_field.model, str):
        if isinstance(self.remote_field.model, str):
              kwargs['related_name'] = self.remote_field.related_name
          if self.remote_field.related_query_name is not None:
              kwargs['related_query_name'] = self.remote_field.related_query_name
          # Rel needs more work.
        if isinstance(self.remote_field.model, str):
              kwargs['to'] = self.remote_field.model
          else:
              kwargs['to'] = "%s.%s" % (
                  self.remote_field.model._meta.app_label,
                  self.remote_field.model._meta.object_name,
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
django/db/models/fields/related.py