diff options
| author | Craig Blaszczyk | 2015-01-07 12:46:23 +0000 |
|---|---|---|
| committer | Craig Blaszczyk | 2015-01-07 12:46:23 +0000 |
| commit | 91e316f7810157474d6246cd0024bd7f7cc31ff7 (patch) | |
| tree | 1279d952e1bbc7cfb281cea90b7d215e15534ea1 /rest_framework/relations.py | |
| parent | 9a4267049ba37883e3e0c21b5d453b9551343b8d (diff) | |
| download | django-rest-framework-91e316f7810157474d6246cd0024bd7f7cc31ff7.tar.bz2 | |
prefer single quotes in source and double quotes in user visible strings; add some missing full stops to user visible strings
Diffstat (limited to 'rest_framework/relations.py')
| -rw-r--r-- | rest_framework/relations.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/rest_framework/relations.py b/rest_framework/relations.py index 42b624e7..05ac3d1c 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -128,9 +128,9 @@ class StringRelatedField(RelatedField): class PrimaryKeyRelatedField(RelatedField): default_error_messages = { - 'required': _("This field is required."), - 'does_not_exist': _("Invalid pk \"{pk_value}\" - object does not exist."), - 'incorrect_type': _("Incorrect type. Expected pk value, received {data_type}."), + 'required': _('This field is required.'), + 'does_not_exist': _('Invalid pk "{pk_value}" - object does not exist.'), + 'incorrect_type': _('Incorrect type. Expected pk value, received {data_type}.'), } def use_pk_only_optimization(self): @@ -152,11 +152,11 @@ class HyperlinkedRelatedField(RelatedField): lookup_field = 'pk' default_error_messages = { - 'required': _("This field is required."), - 'no_match': _("Invalid hyperlink - No URL match."), - 'incorrect_match': _("Invalid hyperlink - Incorrect URL match."), - 'does_not_exist': _("Invalid hyperlink - Object does not exist."), - 'incorrect_type': _("Incorrect type. Expected URL string, received {data_type}."), + 'required': _('This field is required.'), + 'no_match': _('Invalid hyperlink - No URL match.'), + 'incorrect_match': _('Invalid hyperlink - Incorrect URL match.'), + 'does_not_exist': _('Invalid hyperlink - Object does not exist.'), + 'incorrect_type': _('Incorrect type. Expected URL string, received {data_type}.'), } def __init__(self, view_name=None, **kwargs): @@ -291,8 +291,8 @@ class SlugRelatedField(RelatedField): """ default_error_messages = { - 'does_not_exist': _("Object with {slug_name}={value} does not exist."), - 'invalid': _("Invalid value."), + 'does_not_exist': _('Object with {slug_name}={value} does not exist.'), + 'invalid': _('Invalid value.'), } def __init__(self, slug_field=None, **kwargs): |
