Archives March 16, 2012

Friday, 16th March 2012 - 19:42:55

Django

Hrm... facepalm... "default=datetime.now()" != "default=datetime.now" #python

I have the date in the title of my blog entries, recently  I added some code to do this automatically. When defining the model originally I had default=datetime.now(). This set the default title of my blog to the date and time when the model was evaluated. So when I came back the next day to add an entry the date was for the day I added the code and touched the .wsgi file. By passing the function, not the result it means that the function is evaluated when a record is made.

Friday, 16th March 2012 - 19:23:17

Chip

First week at the new job went well. So many new toys! Lots of new stuff to learn.