Re: MySQL-problem with NULL values (svn rev. 4788)

2007-03-23 Thread Frank Tegtmeyer
Malcolm Tredinnick <[EMAIL PROTECTED]> writes: > http://www.djangoproject.com/documentation/model-api/#overriding-default-model-methods > . Found it two minutes before :) Many thanks! Regards, Frank --~--~-~--~~~---~--~~ You received this message because you ar

Re: MySQL-problem with NULL values (svn rev. 4788)

2007-03-23 Thread Malcolm Tredinnick
On Fri, 2007-03-23 at 23:31 +0100, Frank Tegtmeyer wrote: > Hi Malcolm, > > thanks for your replies. > > > In your form processing code, check for empty strings and update it with > > the default value if you wish. > > I use the create_object generic view. I looked for the mentioned > pre_save

Re: MySQL-problem with NULL values (svn rev. 4788)

2007-03-23 Thread Frank Tegtmeyer
Hi Malcolm, thanks for your replies. > In your form processing code, check for empty strings and update it with > the default value if you wish. I use the create_object generic view. I looked for the mentioned pre_save hook in all the docs but couldn't find any hint how to use this. I assume pr

Re: MySQL-problem with NULL values (svn rev. 4788)

2007-03-23 Thread Malcolm Tredinnick
On Fri, 2007-03-23 at 22:15 +0100, Frank Tegtmeyer wrote: [...] > Questions: > > 1. Why is the default value in the database not set to 0? The 'default' attribute in Django is intentionally not passed through as a database constraint when the table is constructed. This is partly because there ar