Re: Datefield auto_now_add not working with sqlite3?

2009-10-05 Thread Karen Tracey
On Mon, Oct 5, 2009 at 4:43 PM, Serdar wrote: > > Sqlite doesn't allow you to modify columns -- only add them, correct? > If that's the case, I think I'll have to add the column using SQL, and > then map to it in my model defintion, right? > > I don't know, I don't do much with sqlite except casu

Re: Datefield auto_now_add not working with sqlite3?

2009-10-05 Thread Serdar
> Django does not implement any defaults, including auto_now_add, by > specifying the default at the SQL level.  Rather Django ensures that the > default value is specified when it saves a row to the database. Aha! That explains it. > > So if you are going outside of Django to insert records, th

Re: Datefield auto_now_add not working with sqlite3?

2009-10-05 Thread Karen Tracey
On Mon, Oct 5, 2009 at 3:52 PM, Serdar T. wrote: > > Hi everyone, > I'm having a problem with the "auto_now_add" option for DateField. > > I was under the impression that when you set this option, a datestamp > is set automatically for you. But when I try inserting records into my > database with

Datefield auto_now_add not working with sqlite3?

2009-10-05 Thread Serdar T.
Hi everyone, I'm having a problem with the "auto_now_add" option for DateField. I was under the impression that when you set this option, a datestamp is set automatically for you. But when I try inserting records into my database without supplying a date for this field, I get a NULL value error: