title: Post to django rest framework
body: <p>I'd like to post to my Django server using <code>post</code> so I can add a <code>todo</code> item. Here is the model:</p>
  
  <pre><code>class Todo(models.Model):
      title = models.CharField(max_length=200);
      text = models.TextField()
      completed = models.BooleanField(default=False)
      created_at = models.DateTimeField(default=datetime.now, blank = True )
      def __str__(self):
          return self.title
  </code></pre>
  
  <p>And serializers:</p>
  
  <pre><code>class TodoSerializer(serializers.ModelSerializer):
      class Meta:
          model = Todo
          fields = ("id", 'title','text', 'completed', 'created_at')
  </code></pre>
  
  <p>And view:</p>
  
  <pre><code>class TodoList(APIView):
      def get(self,request):
          todo=Todo.objects.all()
          serializer=TodoSerializer(todo,many=True)
          return Response(serializer.data)
      def post(self,request):
          Todo.objects.create(
              title=request.POST.get('title'),
              text=request.POST.get('text'))
          return HttpResponse(status=201)
  </code></pre>
  
  <p>My post request is</p>
  
  <pre><code>{ "title": "new title",
    "text": "a test text"}
  </code></pre>
  
  <p>And it told me </p>
  
  <pre><code>IntegrityError at /todos/
  (1048, "Column 'title' cannot be null")
  </code></pre>
  
  <p>As a newbie at Django, I don't understand this error. Any ideas?</p>