aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/settings.py
diff options
context:
space:
mode:
authorTom Christie2013-03-05 17:50:28 +0000
committerTom Christie2013-03-05 17:50:28 +0000
commitc20ebe95f6707d63373d9c583e90bcbc6e021899 (patch)
tree8c51d642ef180b37f6799a45ccced9b71665fb7c /rest_framework/settings.py
parent6e7ddd579b6604d1b0d6da8e4d09762be4520e35 (diff)
parent5e5cd6f7f7357d68d5c10500ec0379e49d679202 (diff)
downloaddjango-rest-framework-c20ebe95f6707d63373d9c583e90bcbc6e021899.tar.bz2
Merge datetime formats
Diffstat (limited to 'rest_framework/settings.py')
-rw-r--r--rest_framework/settings.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/rest_framework/settings.py b/rest_framework/settings.py
index b7aa0bbe..02d751e1 100644
--- a/rest_framework/settings.py
+++ b/rest_framework/settings.py
@@ -18,8 +18,11 @@ REST framework settings, checking for user settings first, then falling
back to the defaults.
"""
from __future__ import unicode_literals
+
from django.conf import settings
from django.utils import importlib
+
+from rest_framework import ISO8601
from rest_framework.compat import six
@@ -76,6 +79,22 @@ DEFAULTS = {
'URL_FORMAT_OVERRIDE': 'format',
'FORMAT_SUFFIX_KWARG': 'format',
+
+ # Input and output formats
+ 'DATE_INPUT_FORMATS': (
+ ISO8601,
+ ),
+ 'DATE_OUTPUT_FORMAT': ISO8601,
+
+ 'DATETIME_INPUT_FORMATS': (
+ ISO8601,
+ ),
+ 'DATETIME_OUTPUT_FORMAT': ISO8601,
+
+ 'TIME_INPUT_FORMATS': (
+ ISO8601,
+ ),
+ 'TIME_OUTPUT_FORMAT': ISO8601,
}