mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
Merge 92c630ef24
into 3e8068757b
This commit is contained in:
commit
130311bfbe
|
@ -69,15 +69,17 @@ class GenericAPIView(views.APIView):
|
||||||
# and should be considered private API.
|
# and should be considered private API.
|
||||||
paginator_class = Paginator
|
paginator_class = Paginator
|
||||||
|
|
||||||
def get_serializer_context(self):
|
def get_serializer_context(self, **kwargs):
|
||||||
"""
|
"""
|
||||||
Extra context provided to the serializer class.
|
Extra context provided to the serializer class.
|
||||||
"""
|
"""
|
||||||
return {
|
context = {
|
||||||
'request': self.request,
|
'request': self.request,
|
||||||
'format': self.format_kwarg,
|
'format': self.format_kwarg,
|
||||||
'view': self
|
'view': self
|
||||||
}
|
}
|
||||||
|
context.update(**kwargs)
|
||||||
|
return context
|
||||||
|
|
||||||
def get_serializer(self, instance=None, data=None, many=False, partial=False):
|
def get_serializer(self, instance=None, data=None, many=False, partial=False):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user