Marta Miranda

Modificado las modificaciones solicitadas

1 -from django.test import TestCase  
2 -  
3 -# Create your tests here.  
@@ -2,6 +2,7 @@ from rest_framework import viewsets, filters @@ -2,6 +2,7 @@ from rest_framework import viewsets, filters
2 from django_filters.rest_framework import DjangoFilterBackend 2 from django_filters.rest_framework import DjangoFilterBackend
3 from rest_framework.permissions import IsAuthenticated 3 from rest_framework.permissions import IsAuthenticated
4 4
  5 +
5 from core.permissions import CustomModelPermissions 6 from core.permissions import CustomModelPermissions
6 from organismo.filters import OrganismoFilter 7 from organismo.filters import OrganismoFilter
7 from organismo.models import Organismo 8 from organismo.models import Organismo
@@ -10,7 +11,7 @@ from organismo.serializers import OrganismoSerializer @@ -10,7 +11,7 @@ from organismo.serializers import OrganismoSerializer
10 11
11 class OrganismoViewSet(viewsets.ReadOnlyModelViewSet): 12 class OrganismoViewSet(viewsets.ReadOnlyModelViewSet):
12 queryset = Organismo.objects.all() 13 queryset = Organismo.objects.all()
13 - # permission_classes = (IsAuthenticated, CustomModelPermissions) 14 + permission_classes = (IsAuthenticated, CustomModelPermissions)
14 serializer_class = OrganismoSerializer 15 serializer_class = OrganismoSerializer
15 filter_backends = (DjangoFilterBackend, filters.OrderingFilter) 16 filter_backends = (DjangoFilterBackend, filters.OrderingFilter)
16 filterset_class = OrganismoFilter 17 filterset_class = OrganismoFilter
1 -from django.test import TestCase  
2 -  
3 -# Create your tests here.  
1 -from django.test import TestCase  
2 -  
3 -# Create your tests here.