from rest_framework import serializers

from content.models import Content


class ContentSerializer(serializers.ModelSerializer):
    class Meta:
        model = Content
        fields = ('id', 'slug', 'title', 'text', 'created_at')
        lookup_field = 'slug'
        extra_kwargs = {
            'url': {'lookup_field': 'slug'}
        }

9a1549b2e6d34dde925bf3152a57a4255690943c
<mask token>

<mask token>


class ContentSerializer(serializers.ModelSerializer):


    class Meta:
        model = Content
        fields = 'id', 'slug', 'title', 'text', 'created_at'
        lookup_field = 'slug'
        extra_kwargs = {'url': {'lookup_field': 'slug'}}

from rest_framework import serializers
from content.models import Content


class ContentSerializer(serializers.ModelSerializer):


    class Meta:
        model = Content
        fields = 'id', 'slug', 'title', 'text', 'created_at'
        lookup_field = 'slug'
        extra_kwargs = {'url': {'lookup_field': 'slug'}}

from rest_framework import serializers

from content.models import Content


class ContentSerializer(serializers.ModelSerializer):
    class Meta:
        model = Content
        fields = ('id', 'slug', 'title', 'text', 'created_at')
        lookup_field = 'slug'
        extra_kwargs = {
            'url': {'lookup_field': 'slug'}
        }
