Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#9853 closed (fixed)

DateField and DateTimeField documentation incomplete

Reported by: anonymous Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The documentation in the Model Field Reference for the DateField, DateTimeField and TimeField does not mention that these fields normalize to python datetime objects. The documention also does not indicate how to set or modify these values in python code (although acceptable inputs in forms is documented in the Form Fields reference).

I think the DateField doc (http://docs.djangoproject.com/en/dev/ref/models/fields/#datefield) could be improved as follows:

Current: A date field. Has a few extra optional arguments:

Suggested: A date field. Normalizes to a python datetime.date object. Has a few optional arguments.

And similarly for DateTimeField and TimeField.

Attachments (1)

field_normalization.diff (1.5 KB) - added by programmerq 6 years ago.
added notes about normalizing to Python objects

Download all attachments as: .zip

Change History (6)

comment:1 Changed 6 years ago by jacob

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 6 years ago by programmerq

added notes about normalizing to Python objects

comment:2 Changed 6 years ago by programmerq

  • Has patch set
  • Triage Stage changed from Accepted to Ready for checkin

comment:3 Changed 6 years ago by gwilson

  • Resolution set to fixed
  • Status changed from new to closed

(In [10198]) Fixed #9853 -- Added information to the model date/time fields to note the Python objects used to represent them.

comment:4 Changed 6 years ago by gwilson

(In [10199]) [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.

comment:5 Changed 4 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top