title: Django 1.11 Direct assignment to the forward side of a many-to-many set is prohibited
body: <p>I have one model UserSong which has two m2m fields with models Genre and Language</p>
  
  <pre><code>class UserSong(models.Model):
      title           = models.CharField(max_length=100)
      song_file       = models.FileField(upload_to=user_song_directory_path, validators=[validate_audio_file_extension])
      genre           = models.ManyToManyField(Genre)
      language        = models.ManyToManyField(Language)
  </code></pre>
  
  <p>Genre class is</p>
  
  <pre><code>class Genre(models.Model):
      name            = models.CharField(max_length=255)
      created_date    = models.DateTimeField(auto_now_add=True)
      updated_date    = models.DateTimeField(auto_now=True)
      status          = models.BooleanField(default=False)
  </code></pre>
  
  <p>Language class is</p>
  
  <pre><code>class Language(models.Model):
      name            = models.CharField(max_length=255)
      created_date    = models.DateTimeField(auto_now_add=True)
      updated_date    = models.DateTimeField(auto_now=True)
      status          = models.BooleanField(default=False)
  </code></pre>
  
  <p>I am trying to add m2m fields in UserSong object as</p>
  
  <pre><code>genre_name_list =  Genre.objects.filter(name__in=self.cleaned_data['genre'].values_list('name',flat=True))
          # instance.genre.add(*genre_name_list)
          instance.genre.set(genre_name_list)
  
  language_name_list =  Language.objects.filter(name__in=self.cleaned_data['language'].values_list('name',flat=True))
          # instance.language.add(*language_name_list)
          instance.language.set(language_name_list)
  </code></pre>
  
  <p>The problem here lies is , m2m table is getting updated as it should but still Django is giving me error <code>Direct assignment to the forward side of a many-to-many set is prohibited. Use language.set() instead.</code></p>
  
  <p>StackTrace </p>
  
  <pre><code>form.cleaned_data['genre'] &lt;class 'genre.models.Genre'&gt;
  artist received is  &lt;QuerySet [&lt;UserProfile: Pragya Nagpal&gt;]&gt;
  Internal Server Error: /users/5/25/edit_music
  Traceback (most recent call last):
    File "/usr/lib/python3.5/site-packages/django/core/handlers/exception.py", line 35, in inner
      response = get_response(request)
    File "/usr/lib/python3.5/site-packages/django/core/handlers/base.py", line 128, in _get_response
      response = self.process_exception_by_middleware(e, request)
    File "/usr/lib/python3.5/site-packages/django/core/handlers/base.py", line 126, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/usr/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
      return view_func(request, *args, **kwargs)
    File "/root/new_songdew_store/songdewUser/views.py", line 833, in add_edit_music
      status=model_instance.status)
    File "/usr/lib/python3.5/site-packages/django/db/models/manager.py", line 82, in manager_method
      return getattr(self.get_queryset(), name)(*args, **kwargs)
    File "/usr/lib/python3.5/site-packages/django/db/models/query.py", line 415, in create
      obj = self.model(**kwargs)
    File "/usr/lib/python3.5/site-packages/django/db/models/base.py", line 490, in __init__
      _setattr(self, prop, kwargs[prop])
    File "/usr/lib/python3.5/site-packages/django/db/models/fields/related_descriptors.py", line 509, in __set__
      % self._get_set_deprecation_msg_params(),
  TypeError: Direct assignment to the forward side of a many-to-many set is prohibited. Use language.set() instead.
  </code></pre>