-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #346 from sparcs-kaist/feature/affiliated-company
Remove board pagination & Update isort pre-commit hook
- Loading branch information
Showing
5 changed files
with
116 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ repos: | |
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: [--profile=black] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
from rest_framework import viewsets, permissions | ||
|
||
from ara.classes.viewset import ActionAPIViewSet | ||
from rest_framework import permissions, viewsets | ||
|
||
from apps.core.models import Board | ||
from apps.core.serializers.board import ( | ||
BoardSerializer, | ||
BoardDetailActionSerializer, | ||
) | ||
from apps.core.serializers.board import BoardDetailActionSerializer, BoardSerializer | ||
from ara.classes.viewset import ActionAPIViewSet | ||
|
||
|
||
class BoardViewSet(viewsets.ReadOnlyModelViewSet, ActionAPIViewSet): | ||
pagination_class = None | ||
queryset = Board.objects.all().reverse() | ||
filterset_fields = ['is_readonly', 'is_hidden'] | ||
filterset_fields = ["is_readonly", "is_hidden"] | ||
serializer_class = BoardSerializer | ||
permission_classes = ( | ||
permissions.IsAuthenticated, | ||
) | ||
permission_classes = (permissions.IsAuthenticated,) | ||
action_serializer_class = { | ||
'list': BoardDetailActionSerializer, | ||
"list": BoardDetailActionSerializer, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.