Adicionar EventSerializer e UserSerializer

parent 1c20a077
from eventos.core.serializers.event import EventSerializer
from eventos.core.serializers.user import UserSerializer
from rest_framework_mongoengine import serializers
from eventos.core.models import Event
class EventSerializer(serializers.DocumentSerializer):
class Meta:
model = Event
fields = ["id", "name", "name_english", "starts_on", "ends_on", "local", "description", "owner"]
from rest_framework_mongoengine import serializers
from eventos.core.models import User
class UserSerializer(serializers.DocumentSerializer):
class Meta:
model = User
fields = ["id", "first_name", "last_name", "email", "password"]
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