Author: gwilson
Date: 2009-03-30 13:32:49 -0500 (Mon, 30 Mar 2009)
New Revision: 10199
Modified:
django/branches/releases/1.0.X/docs/ref/models/fields.txt
Log:
[1.0.X]: Fixed #9853 -- Added information to the model date/time fields to note
the Python objects used to represent them.
Backport of r10198 from trunk.
Modified: django/branches/releases/1.0.X/docs/ref/models/fields.txt
===================================================================
--- django/branches/releases/1.0.X/docs/ref/models/fields.txt 2009-03-30
18:30:44 UTC (rev 10198)
+++ django/branches/releases/1.0.X/docs/ref/models/fields.txt 2009-03-30
18:32:49 UTC (rev 10199)
@@ -365,13 +365,14 @@
.. 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 @@
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,10 +708,12 @@
.. 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``
------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---