Commit aa68b8ad authored by Bruno Martin's avatar Bruno Martin
Browse files

Merge branch 'develop' of git.hacklab.com.br:hackmooc/django-courses into develop

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