Adicionar EventViewSet e UserViewSet

parent 17dca732
from eventos.core.views.event import EventViewSet
from eventos.core.views.user import UserViewSet
from rest_framework_mongoengine import viewsets
from eventos.core.models import Event
from eventos.core.serializers import EventSerializer
class EventViewSet(viewsets.ModelViewSet):
queryset = Event.objects.all()
serializer_class = EventSerializer
from rest_framework_mongoengine import viewsets
from eventos.core.models import User
from eventos.core.serializers import UserSerializer
class UserViewSet(viewsets.ModelViewSet):
queryset = User.objects.all()
serializer_class = UserSerializer
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