File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change 3333
3434
3535REST_FRAMEWORK = {
36- 'PAGINATE_BY' : 10 ,
36+ 'PAGINATE_BY' : 1 ,
3737 'DEFAULT_PAGINATION_SERIALIZER_CLASS' :
3838 'rest_framework_ember.pagination.EmberPaginationSerializer' ,
3939 'DEFAULT_PARSER_CLASSES' : (
Original file line number Diff line number Diff line change @@ -66,18 +66,3 @@ class EmberPaginationSerializer(pagination.BasePaginationSerializer):
6666 previous_link = PreviousPageField (source = '*' )
6767 count = serializers .Field (source = 'paginator.count' )
6868
69- def __init__ (self , * args , ** kwargs ):
70- super (pagination .BasePaginationSerializer , self ).__init__ (
71- * args , ** kwargs )
72- results_field = self .results_field
73- object_serializer = self .opts .object_serializer_class
74-
75- if 'context' in kwargs :
76- # get the dynamic root key
77- results_field = get_resource_name (
78- kwargs .get ('context' ).get ('view' ))
79- context_kwarg = {'context' : kwargs ['context' ]}
80- else :
81- context_kwarg = {}
82-
83- self .fields [results_field ] = object_serializer (source = 'object_list' , ** context_kwarg )
You can’t perform that action at this time.
0 commit comments