feat [back]: basic authentication
This commit is contained in:
parent
4884be5724
commit
19311413bb
1 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@ from django.db.models import Q
|
|||
from django.db.models.functions import TruncMonth
|
||||
from rest_framework import viewsets, mixins
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.renderers import StaticHTMLRenderer
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.viewsets import GenericViewSet
|
||||
|
@ -20,6 +21,7 @@ import myapi.services.com_service as com
|
|||
class AdminFilmViewSet(viewsets.ModelViewSet):
|
||||
queryset = Film.objects.all().order_by("-projection_date")
|
||||
serializer_class = FilmSerializer
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
def general_com_view(self, com_function: Callable[[Film], str]):
|
||||
film: Film = self.get_object()
|
||||
|
|
Loading…
Add table
Reference in a new issue