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
b4435600
Commit
b4435600
authored
May 08, 2013
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix DATETIME_FORMAT, DATE_FORMAT, TIME_FORMAT settings. Closes #798
parent
de69a28b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
docs/api-guide/settings.md
+1
-1
rest_framework/fields.py
+3
-3
rest_framework/settings.py
+3
-3
No files found.
docs/api-guide/settings.md
View file @
b4435600
...
@@ -203,7 +203,7 @@ A format string that should be used by default for rendering the output of `Date
...
@@ -203,7 +203,7 @@ A format string that should be used by default for rendering the output of `Date
May be any of
`None`
,
`'iso-8601'`
or a python
[
strftime format
][
strftime
]
string.
May be any of
`None`
,
`'iso-8601'`
or a python
[
strftime format
][
strftime
]
string.
Default:
`None
'
`
Default:
`None`
#### DATETIME_INPUT_FORMATS
#### DATETIME_INPUT_FORMATS
...
...
rest_framework/fields.py
View file @
b4435600
...
@@ -500,7 +500,7 @@ class DateField(WritableField):
...
@@ -500,7 +500,7 @@ class DateField(WritableField):
}
}
empty
=
None
empty
=
None
input_formats
=
api_settings
.
DATE_INPUT_FORMATS
input_formats
=
api_settings
.
DATE_INPUT_FORMATS
format
=
None
format
=
api_settings
.
DATE_FORMAT
def
__init__
(
self
,
input_formats
=
None
,
format
=
None
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
input_formats
=
None
,
format
=
None
,
*
args
,
**
kwargs
):
self
.
input_formats
=
input_formats
if
input_formats
is
not
None
else
self
.
input_formats
self
.
input_formats
=
input_formats
if
input_formats
is
not
None
else
self
.
input_formats
...
@@ -563,7 +563,7 @@ class DateTimeField(WritableField):
...
@@ -563,7 +563,7 @@ class DateTimeField(WritableField):
}
}
empty
=
None
empty
=
None
input_formats
=
api_settings
.
DATETIME_INPUT_FORMATS
input_formats
=
api_settings
.
DATETIME_INPUT_FORMATS
format
=
None
format
=
api_settings
.
DATETIME_FORMAT
def
__init__
(
self
,
input_formats
=
None
,
format
=
None
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
input_formats
=
None
,
format
=
None
,
*
args
,
**
kwargs
):
self
.
input_formats
=
input_formats
if
input_formats
is
not
None
else
self
.
input_formats
self
.
input_formats
=
input_formats
if
input_formats
is
not
None
else
self
.
input_formats
...
@@ -632,7 +632,7 @@ class TimeField(WritableField):
...
@@ -632,7 +632,7 @@ class TimeField(WritableField):
}
}
empty
=
None
empty
=
None
input_formats
=
api_settings
.
TIME_INPUT_FORMATS
input_formats
=
api_settings
.
TIME_INPUT_FORMATS
format
=
None
format
=
api_settings
.
TIME_FORMAT
def
__init__
(
self
,
input_formats
=
None
,
format
=
None
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
input_formats
=
None
,
format
=
None
,
*
args
,
**
kwargs
):
self
.
input_formats
=
input_formats
if
input_formats
is
not
None
else
self
.
input_formats
self
.
input_formats
=
input_formats
if
input_formats
is
not
None
else
self
.
input_formats
...
...
rest_framework/settings.py
View file @
b4435600
...
@@ -86,17 +86,17 @@ DEFAULTS = {
...
@@ -86,17 +86,17 @@ DEFAULTS = {
'DATE_INPUT_FORMATS'
:
(
'DATE_INPUT_FORMATS'
:
(
ISO_8601
,
ISO_8601
,
),
),
'DATE_FORMAT'
:
ISO_8601
,
'DATE_FORMAT'
:
None
,
'DATETIME_INPUT_FORMATS'
:
(
'DATETIME_INPUT_FORMATS'
:
(
ISO_8601
,
ISO_8601
,
),
),
'DATETIME_FORMAT'
:
ISO_8601
,
'DATETIME_FORMAT'
:
None
,
'TIME_INPUT_FORMATS'
:
(
'TIME_INPUT_FORMATS'
:
(
ISO_8601
,
ISO_8601
,
),
),
'TIME_FORMAT'
:
ISO_8601
,
'TIME_FORMAT'
:
None
,
# Pending deprecation
# Pending deprecation
'FILTER_BACKEND'
:
None
,
'FILTER_BACKEND'
:
None
,
...
...
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