On Wednesday 30 Nov 2005 8:13 pm, Nebojša Đorđević - nesh wrote: > On 27-11-2005, at 3:21, Kenneth Gonsalves wrote: > > so how do you prevent that? i dont like to waste code checking > > if all the mandatory fields are filled - i want postgres to do > > that. Looking at the table, there is no mention of a default > > value. > > Can you post your model? It seems to me that you have something > like this: > > name = meta.CharField(maxlength=200, blank=True)
no > > If you want to check for empty data you can just use: > > name = meta.CharField(maxlength=200) i have this > > and django itself will check that name field is not *blank* or > *NULL*. django admin interface checks - but if i do it from a form on the main site, i have to check for empty fields, otherwise save() simply inserts blanks (not nulls) in all fields not filled up. So whats the point of having the 'not null' constraint in my table? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!