-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ndpoint Create DW endpoint for exposing advice denial reasons
- Loading branch information
Showing
4 changed files
with
42 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,13 +1,21 @@ | ||
from rest_framework import viewsets | ||
from rest_framework.pagination import LimitOffsetPagination | ||
|
||
from api.applications.serializers.advice import Advice | ||
from api.cases.serializers import AdviceSerializer | ||
from api.core.authentication import DataWorkspaceOnlyAuthentication | ||
from api.applications.serializers.advice import Advice | ||
from api.data_workspace.serializers import AdviceDenialReasonSerializer | ||
|
||
|
||
class AdviceListView(viewsets.ReadOnlyModelViewSet): | ||
authentication_classes = (DataWorkspaceOnlyAuthentication,) | ||
serializer_class = AdviceSerializer | ||
pagination_class = LimitOffsetPagination | ||
queryset = Advice.objects.all() | ||
|
||
|
||
class AdviceDenialReasonListView(viewsets.ReadOnlyModelViewSet): | ||
authentication_classes = (DataWorkspaceOnlyAuthentication,) | ||
serializer_class = AdviceDenialReasonSerializer | ||
pagination_class = LimitOffsetPagination | ||
queryset = Advice.denial_reasons.through.objects.all() |
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
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