Verified Commit 07a5aa26 authored by Micheal Gendy's avatar Micheal Gendy
Browse files

add context

parent fa5101db
......@@ -60,7 +60,7 @@ class {{ model }}APIListView(GenericAPIView):
items = {{ model }}.objects.order_by('pk')
paginator = PageNumberPagination()
result_page = paginator.paginate_queryset(items, request)
serializer = {{ model }}Serializer(result_page, many=True)
serializer = {{ model }}Serializer(result_page, many=True,context={'request':request})
return paginator.get_paginated_response(serializer.data)
def post(self, request, format=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment