Tag Archives: python

Caught AttributeError while rendering: ‘datetime.date’ object has no attribute ‘date’

To fix just replace this:

end = models.DateTimeField(default=datetime.date.today(), blank=True)

with this:

end = models.DateTimeField(default=datetime.datetime.now(), blank=True)

Advertisements

jpeg support not available bug in PIL 1.1.7 in Ubuntu 11.10

Before installing PIL edit the setup.py and add this line

add_directory(library_dirs, "/usr/lib/i386-linux-gnu")

before line 214  

add_directory(library_dirs, "/usr/lib")