Opened 17 years ago

Closed 17 years ago

#4876 closed (invalid)

typo error

Reported by: james_027@… Owned by: Jacob
Component: Documentation Version: 0.96
Severity: 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

def was_published_today(self):

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

instead of

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

Change History (1)

comment:1 by John Shaffer <jshaffer2112@…>, 17 years ago

Resolution: invalid
Status: newclosed

This example code is in tutorials 1 and 2.

There's no error here. You may have used "from datetime import datetime" rather than "import datetime". The Python shell examples use the first import, but the models file should use the second. They could be normalized to avoid this confusion, but that's a separate issue.

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