-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc15a5b
commit 0adbe9d
Showing
10 changed files
with
53 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
from .views import * |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
from .views import * |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from rest_framework import serializers | ||
from apps.borrowers.models import Borrower | ||
|
||
|
||
class BorrowersListSerializer(serializers.ModelSerializer): | ||
class Meta: | ||
model = Borrower | ||
fields = "__all__" | ||
|
||
|
||
__all__ = ("BorrowersListSerializer",) |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from rest_framework.generics import ListAPIView | ||
from rest_framework.permissions import IsAuthenticated | ||
|
||
from apps.borrowers.api.BorrowersList.serializers import BorrowersListSerializer | ||
from apps.borrowers.models import Borrower | ||
|
||
|
||
class BorrowersListAPIView(ListAPIView): | ||
permission_classes = (IsAuthenticated,) | ||
serializer_class = BorrowersListSerializer | ||
queryset = Borrower.objects.all() | ||
|
||
|
||
__all__ = ("BorrowersListAPIView",) |
Empty file.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
from .views import * |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from rest_framework import serializers | ||
from apps.loans.models import Loan | ||
|
||
|
||
class LoansListSerializer(serializers.ModelSerializer): | ||
class Meta: | ||
model = Loan | ||
fields = "__all__" | ||
|
||
|
||
__all__ = ("LoansListSerializer",) |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from rest_framework.generics import ListAPIView | ||
from rest_framework.permissions import IsAuthenticated | ||
|
||
from apps.loans.api.LoansList.serializers import LoansListSerializer | ||
from apps.loans.models import Loan | ||
|
||
|
||
class LoansListAPIView(ListAPIView): | ||
permission_classes = (IsAuthenticated,) | ||
serializer_class = LoansListSerializer | ||
queryset = Loan.objects.all() | ||
|
||
|
||
__all__ = ("LoansListAPIView",) |
Empty file.
Empty file.