http://127.0.0.1:8000/?words=anger
我想动态地向场序列化器添加'anger'。
from .models import Synonym
from rest_framework import serializers
class SynonymSerializer(serializers.ModelSerializer):
class Meta:
model = Synonym
fields = ('word',)