title: validating post method data in serializer
body: <p>I have a simple model:</p>
  <pre><code>     class News(models.Model):
           viewed = models.BooleanField(default=False)
           headline = models.CharField()
  </code></pre>
  <p>Given headline, I want to set the viewed to True. My question revolves around structuring the app/code base. Where do I validate the headline exists and update it?</p>
  <p>serializer.py</p>
  <pre><code>     class NewsSerializer(serializers.Serializer):
           def validate(self,data):
             try:
                news = News.objects.get(headline=data.get('headline'))
                return data
             except:
                raise serializer.ValidationError('headlinenotfound')
  </code></pre>
  <p>views.py</p>
  <pre><code>    def post(self, request):
           headline = request.data.headline
           serializer = NewsSerializer(data=request.data)
           if serializer.is_valid():
                #get the news to update
                news = News.object.get(headline=headline)
                news.viewed = True
                news.save()
              
      
          
  </code></pre>