예제 #1
0
class QuestionsSerialize(ModelSerializer):

    choices = StringSerializer(many=True)
    users = StringSerializer(many=True)

    class Meta:

        model = Questions
        fields = ('__all__')
예제 #2
0
class CommentListViewSerialize(ModelSerializer):

    questtionaire = StringSerializer(many=False)
    user = StringSerializer(many=False)

    class Meta:

        model = Comment
        fields = ('__all__')
예제 #3
0
class GradedQuesttionaireSerializeView(ModelSerializer):

    user = StringSerializer(many=False)
    choice = StringSerializer(many=False)
    quiz = StringSerializer(many=False)

    class Meta:

        model = GradedQuesttionaire
        fields = ('__all__')
예제 #4
0
class CommentsSerializer(ModelSerializer):

    user = StringSerializer(many=False)

    class Meta:

        model = Comment
        fields = ('__all__')
예제 #5
0
class ProjectSerializeSector(ModelSerializer):

    sector = StringSerializer(many = False)

    class Meta:

        model = Project
        fields = ('__all__')
예제 #6
0
class ProjectSerialize(ModelSerializer):

    users = StringSerializer(many=True)

    class Meta:

        model = Project
        fields = ('__all__')
        lookup_field = 'slug'
예제 #7
0
class MeetingSerializeView(ModelSerializer):

    meeting_leader = StringSerializer(many = False)
    project = StringSerializer(many = False)
    sector = StringSerializer(many = False)
    topics = StringSerializer(many = True)
    rules = StringSerializer(many = True)
    users = StringSerializer(many = True)

    class Meta:

        model = Meeting
        fields = ('__all__')