diff options
| author | Gary Wilson Jr <gary.wilson@gmail.com> | 2009-03-30 18:30:44 +0000 |
|---|---|---|
| committer | Gary Wilson Jr <gary.wilson@gmail.com> | 2009-03-30 18:30:44 +0000 |
| commit | 8ed6b2b1d137cc7c9f2a4eed0711ca61a49b1a2e (patch) | |
| tree | 814e9d44d5a888e35e3dbbd43f75d038a1c154f0 /docs | |
| parent | 867e71501c3273ba4a0b3ac13847cd895f0da663 (diff) | |
Fixed #9853 -- Added information to the model date/time fields to note the Python objects used to represent them.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/fields.txt | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 85490d9b9a..df3a07b499 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -365,13 +365,14 @@ portability mentioned there should be heeded. .. class:: DateField([auto_now=False, auto_now_add=False, **options]) -A date field. Has a few extra optional arguments: +A date, represented in Python by a ``datetime.date`` instance. Has a few extra, +optional arguments: .. attribute:: DateField.auto_now Automatically set the field to now every time the object is saved. Useful - for "last-modified" timestamps. Note that the current date is *always* used; - it's not just a default value that you can override. + for "last-modified" timestamps. Note that the current date is *always* + used; it's not just a default value that you can override. .. attribute:: DateField.auto_now_add @@ -380,18 +381,19 @@ A date field. Has a few extra optional arguments: it's not just a default value that you can override. The admin represents this as an ``<input type="text">`` with a JavaScript -calendar, and a shortcut for "Today". The JavaScript calendar will always start -the week on a Sunday. +calendar, and a shortcut for "Today". The JavaScript calendar will always +start the week on a Sunday. ``DateTimeField`` ----------------- .. class:: DateTimeField([auto_now=False, auto_now_add=False, **options]) -A date and time field. Takes the same extra options as :class:`DateField`. +A date and time, represented in Python by a ``datetime.datetime`` instance. +Takes the same extra arguments as :class:`DateField`. -The admin represents this as two ``<input type="text">`` fields, with JavaScript -shortcuts. +The admin represents this as two ``<input type="text">`` fields, with +JavaScript shortcuts. ``DecimalField`` ---------------- @@ -706,9 +708,11 @@ input). .. class:: TimeField([auto_now=False, auto_now_add=False, **options]) -A time. Accepts the same auto-population options as :class:`DateField` and -:class:`DateTimeField`. The admin represents this as an ``<input type="text">`` -with some JavaScript shortcuts. +A time, represented in Python by a ``datetime.time`` instance. Accepts the same +auto-population options as :class:`DateField`. + +The admin represents this as an ``<input type="text">`` with some JavaScript +shortcuts. ``URLField`` ------------ |
