Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
40347933
Commit
40347933
authored
Dec 08, 2014
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing translation markers in realtions.py. Closes #2231.
parent
62cca1ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
rest_framework/relations.py
+8
-8
No files found.
rest_framework/relations.py
View file @
40347933
...
@@ -115,9 +115,9 @@ class StringRelatedField(RelatedField):
...
@@ -115,9 +115,9 @@ class StringRelatedField(RelatedField):
class
PrimaryKeyRelatedField
(
RelatedField
):
class
PrimaryKeyRelatedField
(
RelatedField
):
default_error_messages
=
{
default_error_messages
=
{
'required'
:
'This field is required.'
,
'required'
:
_
(
'This field is required.'
)
,
'does_not_exist'
:
"Invalid pk '{pk_value}' - object does not exist."
,
'does_not_exist'
:
_
(
"Invalid pk '{pk_value}' - object does not exist."
)
,
'incorrect_type'
:
'Incorrect type. Expected pk value, received {data_type}.'
,
'incorrect_type'
:
_
(
'Incorrect type. Expected pk value, received {data_type}.'
)
,
}
}
def
to_internal_value
(
self
,
data
):
def
to_internal_value
(
self
,
data
):
...
@@ -162,11 +162,11 @@ class HyperlinkedRelatedField(RelatedField):
...
@@ -162,11 +162,11 @@ class HyperlinkedRelatedField(RelatedField):
lookup_field
=
'pk'
lookup_field
=
'pk'
default_error_messages
=
{
default_error_messages
=
{
'required'
:
'This field is required.'
,
'required'
:
_
(
'This field is required.'
)
,
'no_match'
:
'Invalid hyperlink - No URL match'
,
'no_match'
:
_
(
'Invalid hyperlink - No URL match'
)
,
'incorrect_match'
:
'Invalid hyperlink - Incorrect URL match.'
,
'incorrect_match'
:
_
(
'Invalid hyperlink - Incorrect URL match.'
)
,
'does_not_exist'
:
'Invalid hyperlink - Object does not exist.'
,
'does_not_exist'
:
_
(
'Invalid hyperlink - Object does not exist.'
)
,
'incorrect_type'
:
'Incorrect type. Expected URL string, received {data_type}.'
,
'incorrect_type'
:
_
(
'Incorrect type. Expected URL string, received {data_type}.'
)
,
}
}
def
__init__
(
self
,
view_name
=
None
,
**
kwargs
):
def
__init__
(
self
,
view_name
=
None
,
**
kwargs
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment