Code

Ticket #9853: field_normalization.diff

File field_normalization.diff, 1.5 KB (added by programmerq, 5 years ago)

added notes about normalizing to Python objects

Line 
1diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
2index 340dcff..e0418d6 100644
3--- a/docs/ref/models/fields.txt
4+++ b/docs/ref/models/fields.txt
5@@ -365,7 +365,8 @@ portability mentioned there should be heeded.
6 
7 .. class:: DateField([auto_now=False, auto_now_add=False, **options])
8 
9-A date field. Has a few extra optional arguments:
10+A date field. Normalizes to a Python ``datetime.date`` object. Has a few extra
11+optional arguments:
12 
13 .. attribute:: DateField.auto_now
14 
15@@ -388,7 +389,8 @@ the week on a Sunday.
16 
17 .. class:: DateTimeField([auto_now=False, auto_now_add=False, **options])
18 
19-A date and time field. Takes the same extra options as :class:`DateField`.
20+A date and time field. Normalizes to a Python ``datetime.datetime`` object.
21+Takes the same extra options as :class:`DateField`.
22 
23 The admin represents this as two ``<input type="text">`` fields, with JavaScript
24 shortcuts.
25@@ -706,9 +708,10 @@ input).
26 
27 .. class:: TimeField([auto_now=False, auto_now_add=False, **options])
28 
29-A time. Accepts the same auto-population options as :class:`DateField` and
30-:class:`DateTimeField`. The admin represents this as an ``<input type="text">``
31-with some JavaScript shortcuts.
32+A time field. Normalizes to a Python ``datetime.time`` object. Accepts the same
33+auto-population options as :class:`DateField` and :class:`DateTimeField`. The
34+admin represents this as an ``<input type="text">`` with some JavaScript
35+shortcuts.
36 
37 ``URLField``
38 ------------