Opened 6 years ago

Closed 6 years ago

Last modified 6 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: UI/UX:

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 Changed 6 years ago by cgrady

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 Changed 6 years ago by Harro <hvdklauw@…>

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

comment:3 Changed 6 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

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