Re: Shouldn't blank=True imply null=True?

2009-01-08 Thread tofergus
On 08.01-13:00, Malcolm Tredinnick wrote: [ ... ] > > a 'blank' value is essentially undefined in database terms and may be > > interpreted in various ways. > > Not, that's a NULL value. Blank has absolutely no technical meaning at > the database level and certainly not any kind of ambiguous

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread Malcolm Tredinnick
On Wed, 2009-01-07 at 21:46 +, tofer...@gmail.com wrote: > On 07.01-13:40, Jeff Anderson wrote: > [ ... ] > > > please troll somewhere else. > > > > > I wasn't trolling, thank you. I was genuinely interested in how this > > would look. > > my apologies, i mis-read your terse questioning.

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread tofergus
On 07.01-13:40, Jeff Anderson wrote: [ ... ] > > please troll somewhere else. > > > I wasn't trolling, thank you. I was genuinely interested in how this > would look. my apologies, i mis-read your terse questioning. a 'blank' value is essentially undefined in database terms and may be

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread Lee Braiden
On Wed, 2009-01-07 at 13:40 -0700, Jeff Anderson wrote: > tofer...@gmail.com wrote: > > ...I was genuinely interested in how this would look. One thing worth bearing in mind is that Django supports different database backends. Potentially, or ideally, it might even support non-SQL databases,

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread Jeff Anderson
tofer...@gmail.com wrote: > On 07.01-08:51, Jeff Anderson wrote: > >>> I agree with this. I use null=False, blank=True for some ImageFields >>> and integers. >>> >> I'm interested in how a blank integer looks in a MySQL database. Can you >> provide an example? >> > > please troll

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread tofergus
On 07.01-08:51, Jeff Anderson wrote: > > I agree with this. I use null=False, blank=True for some ImageFields > > and integers. > I'm interested in how a blank integer looks in a MySQL database. Can you > provide an example? please troll somewhere else.

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread Karen Tracey
On Wed, Jan 7, 2009 at 12:48 PM, Jeff Anderson wrote: > Karen Tracey wrote: > > On Wed, Jan 7, 2009 at 10:51 AM, Jeff Anderson >wrote: > > > > > >> varikin wrote: > >> > >>> I agree with this. I use null=False, blank=True for some ImageFields

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread Jeff Anderson
Karen Tracey wrote: > On Wed, Jan 7, 2009 at 10:51 AM, Jeff Anderson > wrote: > > >> varikin wrote: >> >>> I agree with this. I use null=False, blank=True for some ImageFields >>> and integers. >>> >> I'm interested in how a blank integer looks in a MySQL

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread Karen Tracey
On Wed, Jan 7, 2009 at 10:51 AM, Jeff Anderson wrote: > varikin wrote: > > I agree with this. I use null=False, blank=True for some ImageFields > > and integers. > I'm interested in how a blank integer looks in a MySQL database. Can you > provide an example? > > I

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread Jeff Anderson
varikin wrote: > I agree with this. I use null=False, blank=True for some ImageFields > and integers. I'm interested in how a blank integer looks in a MySQL database. Can you provide an example? signature.asc Description: OpenPGP digital signature

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread varikin
On Jan 7, 5:51 am, tofer...@gmail.com wrote: > On 07.01-09:47, Malcolm Tredinnick wrote: > [ ... ] > > > This thread is about whether blank=True, null=False (the fourth > > possibility) ever makes sense for non-text fields. > > answer is yes for any field type that accepts an empty string as

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread tofergus
On 07.01-09:47, Malcolm Tredinnick wrote: [ ... ] > This thread is about whether blank=True, null=False (the fourth > possibility) ever makes sense for non-text fields. answer is yes for any field type that accepts an empty string as having a meaning. i currently use this for a couple of custom

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread Malinka Rellikwodahs
On Tue, Jan 6, 2009 at 17:47, Malcolm Tredinnick wrote: > This thread is about whether blank=True, null=False (the fourth > possibility) ever makes sense for non-text fields. not sure if django supports binary data or any form of arrays but in those cases it could

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread Malcolm Tredinnick
On Tue, 2009-01-06 at 08:03 -0800, dchandek wrote: [...] > The only gotcha I've encountered here is that practically speaking > null=True requires blank=True. That isn't always valid and it's not the direction that's being proposed in this thread. One of the design goals of Django is to work

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread tofergus
On 06.01-08:03, dchandek wrote: > [ ... ] But shouldn't this be addressed in the > validation code? ps: no, the validation code would exist as it currently does. i am only suggesting a change in convention, not the actual options or their meanings.

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread tofergus
On 06.01-08:03, dchandek wrote: [ ... ] >> i would be against unifying the options as i can imagine a more complex >> environment (i.e. a database trigger or complex type not known to >> django) where there may be a distinction and i believe the current >> distinction is a clear one.  it may be

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread dchandek
> i would be against unifying the options as i can imagine a more complex > environment (i.e. a database trigger or complex type not known to > django) where there may be a distinction and i believe the current > distinction is a clear one.  it may be worthwile to imply that setting > 'null=True'

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread tofergus
On 06.01-07:38, Lee Braiden wrote: [ ... ] > On Tue, 2009-01-06 at 00:05 -0700, Jeff Anderson wrote: > > Malcolm Tredinnick wrote: > > > I don't think we'd want to get too subtle here. Either it makes > > > sense for all non-text fields, or it doesn't. > > Agreed I simply haven't spent any time

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread Lee Braiden
Hi all, On Tue, 2009-01-06 at 00:05 -0700, Jeff Anderson wrote: > Malcolm Tredinnick wrote: > > I don't think we'd want to get too subtle here. Either it makes > sense > > for all non-text fields, or it doesn't. > Agreed– I simply haven't spent any time thinking about this particular > problem

Re: Shouldn't blank=True imply null=True?

2009-01-05 Thread Jeff Anderson
Malcolm Tredinnick wrote: > On Mon, 2009-01-05 at 23:39 -0700, Jeff Anderson wrote: > >> Malcolm Tredinnick wrote: >> >>> The way to think about this problem is whether there's a situation where >>> blank=True, null=False makes sense or is even possible for non-text >>> fields and Mike

Re: Shouldn't blank=True imply null=True?

2009-01-05 Thread Malcolm Tredinnick
On Mon, 2009-01-05 at 23:39 -0700, Jeff Anderson wrote: > Malcolm Tredinnick wrote: > > The way to think about this problem is whether there's a situation where > > blank=True, null=False makes sense or is even possible for non-text > > fields and Mike quite possibly has a valid point there: you

Re: Shouldn't blank=True imply null=True?

2009-01-05 Thread Jeff Anderson
Malcolm Tredinnick wrote: > The way to think about this problem is whether there's a situation where > blank=True, null=False makes sense or is even possible for non-text > fields and Mike quite possibly has a valid point there: you cannot store > a blank value in a non-NULL integer field, for

Re: Shouldn't blank=True imply null=True?

2009-01-05 Thread Malcolm Tredinnick
On Tue, 2009-01-06 at 07:58 +0530, Kenneth Gonsalves wrote: > On Tuesday 06 Jan 2009 12:50:24 am Mike wrote: > > If the type is not a string, and blank=True is set, shouldn't > > null=True be implied? > > no - blank=True is enforced at django level whereas null=True is enforced at > DB level

Re: Shouldn't blank=True imply null=True?

2009-01-05 Thread Kenneth Gonsalves
On Tuesday 06 Jan 2009 12:50:24 am Mike wrote: > If the type is not a string, and blank=True is set, shouldn't > null=True be implied? no - blank=True is enforced at django level whereas null=True is enforced at DB level and blank != null. -- regards KG http://lawgon.livejournal.com

Shouldn't blank=True imply null=True?

2009-01-05 Thread Mike
Hi. Hopefully this has a quick answer; I tried searching the list but didn't come up with an answer. Context: I'm extending django.contrib.auth.models.User with some extra fields, for instance IntegerField() and ForeignKey(). For non-string fields, whenever you use blank=True you also