                  self.remote_field.model._meta.app_label,
                  self.remote_field.model._meta.object_name,
              )
          if getattr(self.remote_field, 'through', None) is not None:
              if isinstance(self.remote_field.through, six.string_types):
                  kwargs['through'] = self.remote_field.through
              elif not self.remote_field.through._meta.auto_created:
                  kwargs['through'] = "%s.%s" % (
                      self.remote_field.through._meta.app_label,
                      self.remote_field.through._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.model, six.string_types):
 </s> add         if isinstance(self.remote_field.model, 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         if isinstance(self.remote_field.through, six.string_types) or not self.remote_field.through._meta.managed:
 </s> add         if isinstance(self.remote_field.through, str) or not self.remote_field.through._meta.managed: </s> remove         if not isinstance(self.file_path, six.string_types):
 </s> add         if not isinstance(self.file_path, str):
            if isinstance(self.remote_field.through, str):
                  self.remote_field.model._meta.app_label,
                  self.remote_field.model._meta.object_name,
              )
          if getattr(self.remote_field, 'through', None) is not None:
            if isinstance(self.remote_field.through, str):
                  kwargs['through'] = self.remote_field.through
              elif not self.remote_field.through._meta.auto_created:
                  kwargs['through'] = "%s.%s" % (
                      self.remote_field.through._meta.app_label,
                      self.remote_field.through._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