hackens-orga/hackens_orga/agent/views.py

12 lines
339 B
Python
Raw Normal View History

2023-02-08 02:04:34 +01:00
from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from .models import Agent
from .serializers import AgentSerializer
class AgentViewSet(viewsets.ModelViewSet):
queryset = Agent.objects.all()
serializer_class = AgentSerializer
permission_class = [IsAuthenticatedOrReadOnly]