diff options
| author | Tom Christie | 2013-03-06 04:25:35 -0800 |
|---|---|---|
| committer | Tom Christie | 2013-03-06 04:25:35 -0800 |
| commit | 6135df56c68a34c61ca8a0d0b2d450502cbc3c75 (patch) | |
| tree | 0724ec928119877e48682089a996ba99b287947b /rest_framework/settings.py | |
| parent | 17e0ff0fcde23f4bc6734b75f7fff734ae77c26d (diff) | |
| parent | d260f1ec15d5aa3085fa74118382bcf2fd752dca (diff) | |
| download | django-rest-framework-6135df56c68a34c61ca8a0d0b2d450502cbc3c75.tar.bz2 | |
Merge pull request #703 from tomchristie/datetime-formats
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..eede0c5a 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 ISO_8601 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': ( + ISO_8601, + ), + 'DATE_FORMAT': ISO_8601, + + 'DATETIME_INPUT_FORMATS': ( + ISO_8601, + ), + 'DATETIME_FORMAT': ISO_8601, + + 'TIME_INPUT_FORMATS': ( + ISO_8601, + ), + 'TIME_FORMAT': ISO_8601, } |
