aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/fields.py
diff options
context:
space:
mode:
authorTom Christie2012-10-04 21:36:40 +0100
committerTom Christie2012-10-04 21:36:40 +0100
commitcc0d2601b8dfdf3f5fcee8591540b9cb4b2f3e44 (patch)
tree0033f774a05a2c018995375890d96344cf06e967 /rest_framework/fields.py
parentc91d926b0664981de0fd239a4398dd71367a5911 (diff)
downloaddjango-rest-framework-cc0d2601b8dfdf3f5fcee8591540b9cb4b2f3e44.tar.bz2
Minor fixes
Diffstat (limited to 'rest_framework/fields.py')
-rw-r--r--rest_framework/fields.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index 9dbc1194..be918235 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -319,7 +319,7 @@ class HyperlinkedRelatedField(RelatedField):
slug = getattr(obj, self.slug_field, None)
if not slug:
- 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)
kwargs = {self.slug_url_kwarg: slug}
try:
@@ -374,9 +374,6 @@ class HyperlinkedIdentityField(Field):
"""
A field that represents the model's identity using a hyperlink.
"""
- def __init__(self, *args, **kwargs):
- pass
-
def field_to_native(self, obj, field_name):
request = self.context.get('request', None)
view_name = self.parent.opts.view_name