serializers.py 206 Bytes
Newer Older
luxcem's avatar
luxcem committed
1 2 3 4 5 6 7 8
from rest_framework import serializers

from rp.models import Article


class ArticleSerializer(serializers.ModelSerializer):
    class Meta:
        model = Article
cynddl's avatar
cynddl committed
9
        fields = ('id', 'url', 'title')