mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-23 22:49:50 +03:00
Make the kwargs from the url available in the request
This commit is contained in:
parent
ff01ae3571
commit
07cb610461
|
@ -75,12 +75,13 @@ class Request(object):
|
|||
_CONTENTTYPE_PARAM = api_settings.FORM_CONTENTTYPE_OVERRIDE
|
||||
|
||||
def __init__(self, request, parsers=None, authenticators=None,
|
||||
negotiator=None, parser_context=None):
|
||||
negotiator=None, parser_context=None, kargs = {}):
|
||||
self._request = request
|
||||
self.parsers = parsers or ()
|
||||
self.authenticators = authenticators or ()
|
||||
self.negotiator = negotiator or self._default_negotiator()
|
||||
self.parser_context = parser_context
|
||||
self.kwargs = kargs
|
||||
self._data = Empty
|
||||
self._files = Empty
|
||||
self._method = Empty
|
||||
|
|
|
@ -275,7 +275,7 @@ class APIView(View):
|
|||
parsers=self.get_parsers(),
|
||||
authenticators=self.get_authenticators(),
|
||||
negotiator=self.get_content_negotiator(),
|
||||
parser_context=parser_context)
|
||||
parser_context=parser_context, kargs=kargs)
|
||||
|
||||
def initial(self, request, *args, **kwargs):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user