You're roughly right, yes. String fields are a little odd, though, in that
you can have them blank=True without null=True and then the default should
be an empty string (Django's separation of blank and null irks me still) -
the migrations should correctly detect this and insert blank strings for
you then. If not, open a bug report!

Andrew


On Sun, Mar 30, 2014 at 5:13 AM, Shai Berger <s...@platonix.com> wrote:

> On Sunday 30 March 2014 15:08:17 Harry Percival wrote:
> > Ah, so the reason I was confused is because it *looks* like the default
> is
> > the empty string, because that's what you get if you initialise an
> object,
> > by default. But at the database level, the default for the column is
> NULL.
> > Is that right?
> >
> > So, I realise we're getting sidetracked here, but,  how does this fit
> with
> > the fact that `null=False` is the default for all Field types?
> >
>
> Simply: The "default default" is that fields are required.
>
> But this is very deep in django-users territory.
>
> Shai.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/201403301513.23581.shai%40platonix.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFwN1urwhyZkfF9smfeeSOeS_8ejFdKmKo3X%3D4yfWd8DGU_%3DTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to