I'm always doing this, so some of you must be too. I'll compare a date field in with a datetime object in Python/DJango like this:
and I'll get:
if self.start_date < datetime.datetime.now():
type object 'datetime.datetime' has no attribute 'datetime'Grrrr, this is super-annoying. Of course, it's a simple fix.
Yaaaaayyyyy! Share on Twitter Share on Facebook
if self.start_date < date.today():