title: Unable to Post data using Django REST Framework
body: <p>I am gettting this <a href="https://i.stack.imgur.com/CyyEY.jpg" rel="nofollow noreferrer">error</a> although I am giving proper string in Text and Title fields.I don't know what are the reasons,However i am able to post the values of remaining three fields(author,Created_date,publish_date). </p>
  
  <p>Serializer.py</p>
  
  <pre><code>from rest_framework import serializers
  from blog.models import Post
  from django.utils import timezone
  from rest_framework.validators import UniqueValidator
  
  class blogSerializer(serializers.ModelSerializer):
      class Meta:
          model = Post
          fields = ('author','title', 'text','created_date','published_date')
  </code></pre>
  
  <p>model.py</p>
  
  <pre><code>from django.db import models
  from django.utils import timezone
  
  class Post(models.Model):
     author = models.ForeignKey('auth.User',null=True)
     title = models.CharField(max_length=200)
     text = models.CharField(max_length=200)
     created_date = models.DateTimeField(
          default=timezone.now)
     published_date = models.DateTimeField(
          blank=True,null=True)
  
     def publish(self):
         self.published_date = timezone.now()
         self.save()
  
     def __str__(self):
         return self.title
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>from blog.models import Post
  from .serializers import UserSerializer, GroupSerializer,blogSerializer
  from rest_framework import viewsets,status
  from rest_framework.decorators import api_view
  
  class blogViewSet(viewsets.ModelViewSet):
      queryset = Post.objects.all()
      serializer_class = blogSerializer
  </code></pre>
  
  <p>here i am posting the data.</p>
  
  <pre><code>    @api_view(['GET', 'POST'])
      def blog_list(request):
         if request.method=='GET':
             my_blog=Post.objects.all()
             serializers=blogSerializer(my_blog,Many=True)
             return JsoResponse(serializers.data,safe=False)
  
         elif request.method=='POST':
             data=JSONParser().parse(request)
             serializers=blogSerializer(data=data)
             if serializers.is_valid():
                serializer.save()
                return JsonResponse(serializers.data,status=201)
             return JsonResponse(serializers.errors,status=400)
  </code></pre>