diff --git a/apps/wallet/views/user.py b/apps/wallet/views/user.py index 8558b5c..73598c3 100755 --- a/apps/wallet/views/user.py +++ b/apps/wallet/views/user.py @@ -188,6 +188,7 @@ class WithdrawVerify(generics.RetrieveAPIView): class TransactionListView(ListView): model = Transaction template_name = 'wallet/transaction_list.html' + ordering = ['-created_at'] def get_queryset(self): user = self.request.user diff --git a/wallet/settings.py b/wallet/settings.py index dd43e1c..b85b9cd 100644 --- a/wallet/settings.py +++ b/wallet/settings.py @@ -108,8 +108,8 @@ REST_FRAMEWORK = { 'DEFAULT_PERMISSION_CLASSES': ( 'rest_framework.permissions.IsAuthenticated', ), - 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', - 'PAGE_SIZE': 20, + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', + 'PAGE_SIZE': 50, "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema", }