diff options
| author | Tom Christie | 2013-03-05 17:50:28 +0000 |
|---|---|---|
| committer | Tom Christie | 2013-03-05 17:50:28 +0000 |
| commit | c20ebe95f6707d63373d9c583e90bcbc6e021899 (patch) | |
| tree | 8c51d642ef180b37f6799a45ccced9b71665fb7c /rest_framework/settings.py | |
| parent | 6e7ddd579b6604d1b0d6da8e4d09762be4520e35 (diff) | |
| parent | 5e5cd6f7f7357d68d5c10500ec0379e49d679202 (diff) | |
| download | django-rest-framework-c20ebe95f6707d63373d9c583e90bcbc6e021899.tar.bz2 | |
Merge datetime formats
Diffstat (limited to 'rest_framework/settings.py')
| -rw-r--r-- | rest_framework/settings.py | 19 |
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, } |
