Пример #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__')