Commit ac16eed2 authored by amandazk's avatar amandazk

Changes

parent d0a8809c
......@@ -14,27 +14,23 @@ class FoneDestroy(generics.DestroyAPIView):
"""Excluindo fone"""
queryset = Fone.objects.all()
serializer_class = FoneSerializer
permission_classes = (
permissions.IsAdminUser,
)
permission_classes = ()
class FoneUpdate(generics.UpdateAPIView):
"""Update de fone"""
queryset = Fone.objects.all()
serializer_class = FoneSerializer
permission_classes = (
permissions.IsAuthenticated,
)
permission_classes = ()
class FoneCreate(generics.CreateAPIView):
"""Criando fone"""
queryset = Fone.objects.all()
serializer_class = FoneSerializer
permission_classes = (
permissions.DjangoModelPermissions,
)
permission_classes = ()
class FoneGet(generics.RetrieveAPIView):
......
......@@ -14,18 +14,14 @@ class PessoaDestroy(generics.DestroyAPIView):
"""Excluindo pessoa"""
queryset = Pessoa.objects.all()
serializer_class = PessoaSerializer
permission_classes = (
permissions.IsAdminUser,
)
permission_classes = ()
class PessoaUpdate(generics.UpdateAPIView):
"""Update de pessoa"""
queryset = Pessoa.objects.all()
serializer_class = PessoaSerializer
permission_classes = (
permissions.IsAuthenticated,
)
permission_classes = ()
class PessoaCreate(generics.CreateAPIView):
......
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