title: How do I specify database model in a serpy serializer?
body: <p>I have two models, </p>
  
  <pre><code>class Publication(models.Model):
      title = models.CharField(max_length=30)
  
  
  class Article(models.Model):
      headline = models.CharField(max_length=100)
      publications = models.ManyToManyField(Publication)
  </code></pre>
  
  <p>I am trying to learn serializing using serpy. </p>
  
  <p>I wrote two serializers, but I am not sure how to mention the model. I wrote a django rest framework serializer, as follows,</p>
  
  <pre><code>class PublicationSerializer(serializers.ModelSerializer):
  
      class Meta:
          model = Publication
          fields = 'title',
  
  class ArticleSerializer(serializers.ModelSerializer):
      publications = PublicationSerializer(many=True)
  
      class Meta:
          model = Article
          fields = '__all__'
  </code></pre>
  
  <p>This is the serializers that I wrote for using with Serpy.</p>
  
  <pre><code>class PublicationSerializer(serpy.Serializer):
  
      title = serpy.Field()
  
  class ArticleSerializer(serpy.Serializer):
      headline = serpy.Field()
      publications = PublicationSerializer()
  </code></pre>
  
  <p>I dont know where should I mention the model,</p>
  
  <p>I would like to be able to serialize a queryset, say</p>
  
  <pre><code>Article.objects.all()
  </code></pre>
  
  <p><strong>what changes must be made to use it with Django Rest Framework?</strong></p>