Django

Code

Ticket #4246 (closed: invalid)

Opened 2 years ago

Last modified 2 years ago

Tutorial errata

Reported by: kwon37xi@gmail.com Assigned to: jacob
Milestone: Component: Documentation
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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()

Attachments

Change History

05/09/07 03:51:54 changed by Simon G. <dev@simon.net.nz>

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to invalid.
  • needs_tests changed.
  • needs_docs changed.

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'

Add/Change #4246 (Tutorial errata)




Change Properties
Action