mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-24 23:19:47 +03:00
Merge branch 'master' into converting-dictionary-keys
This commit is contained in:
commit
688229f1e0
|
@ -6,8 +6,8 @@ python:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- DJANGO=https://github.com/django/django/zipball/master
|
- DJANGO=https://github.com/django/django/zipball/master
|
||||||
- DJANGO=django==1.4.1 --use-mirrors
|
- DJANGO=django==1.4.3 --use-mirrors
|
||||||
- DJANGO=django==1.3.3 --use-mirrors
|
- DJANGO=django==1.3.5 --use-mirrors
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install $DJANGO
|
- pip install $DJANGO
|
||||||
|
|
|
@ -581,7 +581,7 @@ class HyperlinkedRelatedField(RelatedField):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
raise ValidationError('Could not resolve URL for field using view name "%s"', view_name)
|
raise ValidationError('Could not resolve URL for field using view name "%s"' % view_name)
|
||||||
|
|
||||||
def from_native(self, value):
|
def from_native(self, value):
|
||||||
# Convert URL -> model instance pk
|
# Convert URL -> model instance pk
|
||||||
|
@ -680,7 +680,7 @@ class HyperlinkedIdentityField(Field):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
raise ValidationError('Could not resolve URL for field using view name "%s"', view_name)
|
raise ValidationError('Could not resolve URL for field using view name "%s"' % view_name)
|
||||||
|
|
||||||
|
|
||||||
##### Typed Fields #####
|
##### Typed Fields #####
|
||||||
|
|
|
@ -75,12 +75,13 @@ class Request(object):
|
||||||
_CONTENTTYPE_PARAM = api_settings.FORM_CONTENTTYPE_OVERRIDE
|
_CONTENTTYPE_PARAM = api_settings.FORM_CONTENTTYPE_OVERRIDE
|
||||||
|
|
||||||
def __init__(self, request, parsers=None, authenticators=None,
|
def __init__(self, request, parsers=None, authenticators=None,
|
||||||
negotiator=None, parser_context=None):
|
negotiator=None, parser_context=None, kargs = {}):
|
||||||
self._request = request
|
self._request = request
|
||||||
self.parsers = parsers or ()
|
self.parsers = parsers or ()
|
||||||
self.authenticators = authenticators or ()
|
self.authenticators = authenticators or ()
|
||||||
self.negotiator = negotiator or self._default_negotiator()
|
self.negotiator = negotiator or self._default_negotiator()
|
||||||
self.parser_context = parser_context
|
self.parser_context = parser_context
|
||||||
|
self.kwargs = kargs
|
||||||
self._data = Empty
|
self._data = Empty
|
||||||
self._files = Empty
|
self._files = Empty
|
||||||
self._method = Empty
|
self._method = Empty
|
||||||
|
|
|
@ -275,7 +275,7 @@ class APIView(View):
|
||||||
parsers=self.get_parsers(),
|
parsers=self.get_parsers(),
|
||||||
authenticators=self.get_authenticators(),
|
authenticators=self.get_authenticators(),
|
||||||
negotiator=self.get_content_negotiator(),
|
negotiator=self.get_content_negotiator(),
|
||||||
parser_context=parser_context)
|
parser_context=parser_context, kargs=kargs)
|
||||||
|
|
||||||
def initial(self, request, *args, **kwargs):
|
def initial(self, request, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user