Django: Ticket #6680: Error in 0.96 tutorial 1 documentation <p> The line within the Poll.was_published_today(self) function does not work: </p> <p> <tt>return == </tt> </p> <p> The python shell complains that object has no attribute 'date'. When I change the line to: <tt>return self.pub_date ==</tt> </p> <blockquote> <p> it works fine. </p> </blockquote> en-us Django Trac 1.0 mtredinnick Thu, 28 Feb 2008 04:08:57 GMT status changed; needs_better_patch, resolution, needs_tests, needs_docs set <ul> <li><strong>status</strong> changed from <em>new</em> to <em>closed</em> </li> <li><strong>needs_better_patch</strong> unset </li> <li><strong>resolution</strong> set to <em>invalid</em> </li> <li><strong>needs_tests</strong> unset </li> <li><strong>needs_docs</strong> unset </li> </ul> <p> pub_date should be a DateTimeField. It looks like you may have made it a DateField instead. A DateTimeField will mean the Python attribute should be a <tt>datetime.datetime}} object, which does have a {{{date()</tt> method. </p> <p> Check your models (and database) carefully and, if you're still having troubles, post your models to the django-users list with an explanation of what's going wrong. I just worked through the tutorial quickly up to that point and it worked fine for me, so I suspect there's a typo on your end. </p> Ticket