Adicionar SubmissionSerializer

parent bd6373ad
from eventos.core.serializers.embedded import EventSubmissionSerializer, OwnerSerializer
from eventos.core.serializers.event import EventSerializer
from eventos.core.serializers.submission import SubmissionSerializer
from eventos.core.serializers.user import UserSerializer
from rest_framework_mongoengine import serializers
from eventos.core.models import Submission
from eventos.core.serializers import EventSubmissionSerializer, OwnerSerializer
class SubmissionSerializer(serializers.DocumentSerializer):
eventSubmission = EventSubmissionSerializer(many=False)
owners = OwnerSerializer(many=True)
class Meta:
ref_name = "Submission"
model = Submission
fields = ["id", "title", "type", "info", "status", "eventSubmission", "owners"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment