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
58ec7669
Commit
58ec7669
authored
Jan 07, 2015
by
Craig Blaszczyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swap backticks for double quotes
parent
91e316f7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
rest_framework/exceptions.py
+1
-1
rest_framework/fields.py
+6
-6
rest_framework/locale/en_US/LC_MESSAGES/django.po
+4
-4
rest_framework/serializers.py
+1
-1
No files found.
rest_framework/exceptions.py
View file @
58ec7669
...
...
@@ -52,7 +52,7 @@ class APIException(Exception):
# built in `ValidationError`. For example:
#
# from rest_framework import serializers
# raise serializers.ValidationError(
"Value was invalid"
)
# raise serializers.ValidationError(
'Value was invalid'
)
class
ValidationError
(
APIException
):
status_code
=
status
.
HTTP_400_BAD_REQUEST
...
...
rest_framework/fields.py
View file @
58ec7669
...
...
@@ -477,7 +477,7 @@ class Field(object):
class
BooleanField
(
Field
):
default_error_messages
=
{
'invalid'
:
_
(
'
`{input}`
is not a valid boolean.'
)
'invalid'
:
_
(
'
"{input}"
is not a valid boolean.'
)
}
default_empty_html
=
False
initial
=
False
...
...
@@ -505,7 +505,7 @@ class BooleanField(Field):
class
NullBooleanField
(
Field
):
default_error_messages
=
{
'invalid'
:
_
(
'
`{input}`
is not a valid boolean.'
)
'invalid'
:
_
(
'
"{input}"
is not a valid boolean.'
)
}
initial
=
None
TRUE_VALUES
=
set
((
't'
,
'T'
,
'true'
,
'True'
,
'TRUE'
,
'1'
,
1
,
True
))
...
...
@@ -972,7 +972,7 @@ class TimeField(Field):
class
ChoiceField
(
Field
):
default_error_messages
=
{
'invalid_choice'
:
_
(
'
`{input}`
is not a valid choice.'
)
'invalid_choice'
:
_
(
'
"{input}"
is not a valid choice.'
)
}
def
__init__
(
self
,
choices
,
**
kwargs
):
...
...
@@ -1016,8 +1016,8 @@ class ChoiceField(Field):
class
MultipleChoiceField
(
ChoiceField
):
default_error_messages
=
{
'invalid_choice'
:
_
(
'
`{input}`
is not a valid choice.'
),
'not_a_list'
:
_
(
'Expected a list of items but got type
`{input_type}`
.'
)
'invalid_choice'
:
_
(
'
"{input}"
is not a valid choice.'
),
'not_a_list'
:
_
(
'Expected a list of items but got type
"{input_type}"
.'
)
}
default_empty_html
=
[]
...
...
@@ -1118,7 +1118,7 @@ class ListField(Field):
child
=
None
initial
=
[]
default_error_messages
=
{
'not_a_list'
:
_
(
'Expected a list of items but got type
`{input_type}`
.'
)
'not_a_list'
:
_
(
'Expected a list of items but got type
"{input_type}"
.'
)
}
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
rest_framework/locale/en_US/LC_MESSAGES/django.po
View file @
58ec7669
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-07 1
2:28
+0000\n"
"POT-Creation-Date: 2015-01-07 1
8:21
+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -111,7 +111,7 @@ msgid "This field may not be null."
msgstr ""
#: fields.py:480 fields.py:508
msgid "
`{input}`
is not a valid boolean."
msgid "
\"{input}\"
is not a valid boolean."
msgstr ""
#: fields.py:543
...
...
@@ -199,11 +199,11 @@ msgid "Time has wrong format. Use one of these formats instead: {format}."
msgstr ""
#: fields.py:975 fields.py:1019
msgid "
`{input}`
is not a valid choice."
msgid "
\"{input}\"
is not a valid choice."
msgstr ""
#: fields.py:1020 fields.py:1121 serializers.py:476
msgid "Expected a list of items but got type
`{input_type}`
."
msgid "Expected a list of items but got type
\"{input_type}\"
."
msgstr ""
#: fields.py:1050
...
...
rest_framework/serializers.py
View file @
58ec7669
...
...
@@ -473,7 +473,7 @@ class ListSerializer(BaseSerializer):
many
=
True
default_error_messages
=
{
'not_a_list'
:
_
(
'Expected a list of items but got type
`{input_type}`
.'
)
'not_a_list'
:
_
(
'Expected a list of items but got type
"{input_type}"
.'
)
}
def
__init__
(
self
,
*
args
,
**
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