aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/fields.md
diff options
context:
space:
mode:
authorStephan Groß2013-03-01 15:03:27 +0100
committerStephan Groß2013-03-01 15:03:27 +0100
commit7e702439eb4a82fe2ef45911fbb176e95d5f0bce (patch)
treece51ee02c9755f2e99246a73692fb046dafc4c4c /docs/api-guide/fields.md
parent876a58e8bf566b9f05a1f6c921660cf3512ae3af (diff)
downloaddjango-rest-framework-7e702439eb4a82fe2ef45911fbb176e95d5f0bce.tar.bz2
Add docs update - part 1
Diffstat (limited to 'docs/api-guide/fields.md')
-rw-r--r--docs/api-guide/fields.md24
1 files changed, 18 insertions, 6 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index a3dc4fe2..898de12d 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -185,18 +185,20 @@ Corresponds to `django.forms.fields.RegexField`
A date representation.
-Uses `DATE_INPUT_FORMATS` to validate date.
-
Optionally takes `format` as parameter to replace the matching pattern.
Corresponds to `django.db.models.fields.DateField`
+**Signature:** `DateField(input_formats=None, output_format=False)`
+
+ - `input_formats` designates which input formats are supported. This will override the `DATE_INPUT_FORMATS`
+
+ - `output_format` designates which output format will be used. This will override the `DATE_OUTPUT_FORMAT`
+
## DateTimeField
A date and time representation.
-Uses `DATETIME_INPUT_FORMATS` to validate date_time.
-
Optionally takes `format` as parameter to replace the matching pattern.
Corresponds to `django.db.models.fields.DateTimeField`
@@ -211,16 +213,26 @@ If you want to override this behavior, you'll need to declare the `DateTimeField
class Meta:
model = Comment
+**Signature:** `DateTimeField(input_formats=None, output_format=False)`
+
+ - `input_formats` designates which input formats are supported. This will override the `DATETIME_INPUT_FORMATS`
+
+ - `output_format` designates which output format will be used. This will override the `DATETIME_OUTPUT_FORMAT`
+
## TimeField
A time representation.
-Uses `TIME_INPUT_FORMATS` to validate time.
-
Optionally takes `format` as parameter to replace the matching pattern.
Corresponds to `django.db.models.fields.TimeField`
+**Signature:** `TimeField(input_formats=None, output_format=False)`
+
+ - `input_formats` designates which input formats are supported. This will override the `TIME_INPUT_FORMATS`
+
+ - `output_format` designates which output format will be used. This will override the `TIME_OUTPUT_FORMAT`
+
## IntegerField
An integer representation.