Opened 17 years ago

Closed 17 years ago

#3273 closed defect (worksforme)

missing import in models.py, tutorial 2

Reported by: dave.pawson@… Owned by: Adrian Holovaty
Component: contrib.admin 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/tutorial2/

Says
Just for good measure, let's also include the was_published_today custom method from Tutorial 1:

list_display = ('question', 'pub_date', 'was_published_today')

This requires
import datetime
in the file models.py

regards DaveP

Change History (1)

comment:1 by Adrian Holovaty, 17 years ago

Resolution: worksforme
Status: newclosed

Tutorial 1 says: "Note the addition of import datetime to reference Python's standard datetime module."

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