Commit faca6186 authored by Fernando Ribeiro's avatar Fernando Ribeiro
Browse files

Feat: Change Eventviewset from readonly to ModelViewSet

parent b29c2589
......@@ -12,7 +12,7 @@ class Classroom(models.Model):
max_length=255,
)
description = models.TextField(
_('Pronatec'),
_('description'),
blank=True,
)
image = models.ImageField(
......
......@@ -13,12 +13,16 @@ from .serializers import (
from .permissions import IsClassroomAssistantOrCoordinatorOrReadOnly
class EventViewSet(viewsets.ReadOnlyModelViewSet):
class EventViewSet(viewsets.ModelViewSet):
queryset = Event.objects.all()
serializer_class = EventSerializer
permission_classes = [IsAuthenticated]
def get_queryset(self):
queryset = super().get_queryset()
return queryset
class BasicClassroomViewSet(viewsets.ReadOnlyModelViewSet):
......
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