On Tue, 2009-04-07 at 10:26 -0700, Magus wrote:
> I agree with Lee. There should be a way for a developer to store NULL
> into a char field. At the moment null flag has no effect for a
> CharField. Generally saying an empty string is not the same a not
> defined value = NULL. It's pity that the according ticket is closed
> with won't fix http://code.djangoproject.com/ticket/9590

If you do your research, you'll discover that

(a) the people making the decisions on this issue are well aware that
blank is not the same as NULL, which is, in fact, precisely the reason
why null=True is not supported there, and

(b) The reason this is the way it is is because Django is initially and
still primarily use for web-browser-based applications. A blank form
field is ambiguous -- is it blank or null? to provide both options and
remove the abiguity requires yet another UI option.

(b) If you really want a character field that also supports NULL and
you're happy to handle the UI or default behaviour however you want,
there's nothing stopping you. Writing custom fields is very easy,
particularly for something like this. So just go ahead and Do It(tm).

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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