mirror of
https://github.com/nprasad2077/nbaStats.git
synced 2026-11-04 17:19:54 +00:00
fetch 100 players at a time w/pagination
This commit is contained in:
1 parent
f39d19ea19
commit
7b38cb386e
2 files changed
+7
-4
No files matched your search
+1
-4
@@ -12,9 +12,6 @@ from .serializers import PlayerDataSerializer
|
||||
class PlayerDataList(generics.ListCreateAPIView):
|
||||
queryset = PlayerData.objects.all()
|
||||
serializer_class = PlayerDataSerializer
|
||||
# pagination_class = None
|
||||
|
||||
|
||||
# Fetch player data by team
|
||||
|
||||
class PlayerDataByTeamList(generics.ListAPIView):
|
||||
|
||||
@@ -136,3 +136,9 @@ STATIC_URL = 'static/'
|
||||
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 100, # Adjust this value according to the number of records you want to display per page
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user