title: Django Rest Framework HTML POST form giving error message This field is required after submitting
body: <p>My models.py is </p>
  
  <pre><code>class Genre(models.Model):
      genre = models.CharField(max_length=200)
      def __str__(self):
          return self.genre
  
  
  class Movies(models.Model):
      popularity=models.DecimalField(max_digits=5, decimal_places=2)
      director = models.CharField(max_length=200)
      genre = models.ManyToManyField(Genre, blank=True, null=True)
      score= models.DecimalField(max_digits=5, decimal_places=2)
      name = models.CharField(max_length=200)
      def __str__(self):
          return self.name
  </code></pre>
  
  <p>Here is my Serializer and viewset    </p>
  
  <pre><code># Serializers define the API representation.
  class MoviesSerializer(serializers.ModelSerializer):
      #genre =  serializers.StringRelatedField(many=True)
      genre =  serializers.SlugRelatedField(queryset=Genre.objects.all(),many=True,slug_field='genre' )
      class Meta:
          model = Movies
          fields = ('popularity', 'director', 'genre', 'score','name')
  
  # ViewSets define the view behavior.
  class MovieViewSet(viewsets.ModelViewSet):
      queryset = Movies.objects.all()
      serializer_class = MoviesSerializer
  
  # Routers provide an easy way of automatically determining the URL conf.
  router = routers.DefaultRouter()
  router.register(r'movies', MovieViewSet)
  </code></pre>
  
  <p>I am able to see the HTML POST form while logged in as <code>Superuser</code>. But while submitting <code>HTML POST</code> form getting error message <code>This field is required</code>.  What is the error here in the code. Thanks for help in Advance.</p>
  
  <p><a href="https://i.stack.imgur.com/fOUea.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fOUea.jpg" alt="enter image description here"></a><a href="https://i.stack.imgur.com/a26F1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a26F1.jpg" alt="enter image description here"></a></p>