Opened 8 years ago

Closed 8 years ago

#4246 closed (invalid)

Tutorial errata

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

Description

Tutorial part 2

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

shouldn't it be like the following?

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

Change History (1)

comment:1 Changed 8 years ago by Simon G. <dev@…>

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

No? :

In [6]: datetime.date.today()
Out[6]: datetime.date(2007, 5, 9)

In [7]: datetime.today().date()
---------------------------------------------------------------------------
exceptions.AttributeError                            Traceback (most recent call last)

/Users/simon/<ipython console> 

AttributeError: 'module' object has no attribute 'today'
Note: See TracTickets for help on using tickets.
Back to Top