Arrumar serializer Event e User

parent 0f4077fb
from rest_framework_mongoengine import serializers
from eventos.core.models import Event
from eventos.core.serializers import OwnerSerializer
class EventSerializer(serializers.DocumentSerializer):
owners = OwnerSerializer(many=True)
class Meta:
ref_name = "Event"
model = Event
fields = ["id", "name", "name_english", "starts_on", "ends_on", "local", "description", "owner"]
fields = ["id", "name", "name_english", "starts_on", "ends_on", "local", "description", "owners"]
......@@ -6,4 +6,4 @@ from eventos.core.models import User
class UserSerializer(serializers.DocumentSerializer):
class Meta:
model = User
fields = ["id", "first_name", "last_name", "email", "password"]
fields = "__all__"
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