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 ac
On Feb 12, 5:35 pm, tow wrote:
> class TextData(models.Model):
> text = models.TextField(blank=True)
>
> obj = TextData()
> obj.text = None
> obj.save()
>
> gives me an IntegrityError. Why? I don't care that whether that's
> saved as a Null or an zero-length string, I just want Django to sav
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.djan
I'm sure it's possible that I haven't read the django docs properly;
but I think my problem is actually that the Django docs don't speak to
my usecase.
I don't care how the database stores empty values. Really, nothing is
of less interest to me, I find the details of database schemata
extremely b
On Fri, Feb 13, 2009 at 6:31 AM, Lee Braiden wrote:
> What exactly is the reasoning behind this advice? It seems to me that
> one would very rarely want to store an empty string. For example, if
> a user doesn't enter a surname, that does not mean that their surname
> is "", unless they're Cher
2009/2/13 Praveen :
> Avoid using null on string-based fields such as CharField and
> TextField unless you have an excellent reason.
What exactly is the reasoning behind this advice? It seems to me that
one would very rarely want to store an empty string. For example, if
a user doesn't enter a
Hi Toby, you have not read properly the django docs.
Note that empty string values will always get stored as empty strings,
not as NULL.
only use null=True for non-string fields such as integers, booleans
and dates.
For both types of fields, you will also need to set blank=True if you
wish to p
7 matches
Mail list logo