Malcolm Tredinnick wrote:
> On Mon, 2007-03-12 at 12:14 +0100, Roland Hedberg wrote:
>> Hi!
>>
>> I have designed a model which contains among other things a couple of
>> DateFields.
>>
>> Some, actually one, of these must have a value but the other may not.
>>
>> So, I tried to use the construct:
>>
>> done_planned = models.DateField(blank=True)
>>
>> But that doesn't work, because I get a exception with the error:
>>
>> "act_activity.done_planned may not be NULL"
> 
> You will also need null=True on that field, so that the database can
> store a NULL (no value) in that column. Note that if you just add
> null=True to your model, it will not change the database. You will also
> need to either change the database column by hand or recreate the
> database table.

Both you and [EMAIL PROTECTED] talks about recreating the
database. For me who know close to nothing about SQL and sqlite3 (which
is what I'm using in this case) it would be interesting if you could
expand on this or, equally good, point me to something that I can read
myself.

I guess this must be a reoccurring topic when you are modeling a new
site since you never get it right the first time around.

-- Roland


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to