Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#9137 closed (invalid)

Tutorial 1 has a small mistake

Reported by: hvdklauw@… Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords: Tutorial
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

def was_published_today(self):

return self.pub_date.date() == datetime.date.today()

That doesn't seem to work for me,

def was_published_today(self):

return self.pub_date == datetime.date.today()

Does.

Change History (3)

comment:1 by Collin Grady, 16 years ago

Resolution: invalid
Status: newclosed

If you incorrectly made the field a DateField instead of a DateTimeField, your version would work, but the tutorial shows a DateTimeField, so the .date() is required

comment:2 by Harro <hvdklauw@…>, 16 years ago

Wow.. you're right.. that was a big mistake on my part.

comment:3 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

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