예제 #1
0
class ProjectSerializer(serializers.ModelSerializer):
    name = serializers.CharField(max_length=50)
    description = serializers.CharField(max_length=2000)
    creator = MainUserSerializer(read_only=True)
    
    class Meta:
        model = Project
        fields = ('name', 'description', 'creator')