Opened 19 years ago
Closed 19 years ago
#3261 closed defect (worksforme)
Missing imports in example.
| Reported by: | Owned by: | Jacob | |
|---|---|---|---|
| Component: | Documentation | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
http://www.djangoproject.com/documentation/tutorial1/
Has
# Create a new Poll.
from datetime import datetime
p = Poll(question="What's up?", pub_date=datetime.now())
Neither time nor datetime are imported.
I think it should be corrected.
Also the id values are returned as longs.
regards
Note:
See TracTickets
for help on using tickets.
Just tried the entire interactive session just to be sure, it works flawlessly here.
Note the
>>> from datetime import datetimeline, it is importing the datetime class from the datetime module.
Regards,