Well, having stayed up til 4AM on Monday night, I managed to get the whole book upgraded to Django 1.7, and published. I've shared some thoughts on the migrations / tdd stuff we've been discussing, here:
http://www.obeythetestinggoat.com/book-upgraded-to-django-17.html I'd be very interested in ppl's comments, particularly on the part of the book in which I introduce migrations: am I saying the right things, am I giving people the right / best practice habits, etc. http://chimera.labs.oreilly.com/books/1234000000754/ch05.html#_the_django_orm_amp_our_first_model I think my overall conclusion is that the new migrations framework does involve a bit more pain, when doing tdd or when introducing newbies to django, but that that pain is worthwhile, since it's stuff that would come back and bite you later when you gloss over it (which you used to be able to do). cheers all! HP On Tuesday, 1 April 2014 00:32:22 UTC+1, Andrew Godwin wrote: > > Yes, you can - the "migrations or not" switch is currently "is there a > migrations directory", but bear in mind this will eventually turn from "use > the old way" to "ignore it completely", probably also in 1.9. > > Andrew > > > On Mon, Mar 31, 2014 at 4:15 PM, Harry Percival > <[email protected]<javascript:> > > wrote: > >> Just found out that you can make Django behave in the "old way" by just >> deleting the migrations folder when you first do your `startapp`, and then >> you can pretend migrations don't exist until you need them. Don't think >> that's necessarily a good idea though... >> >> >> On 30 March 2014 19:42, Andrew Godwin <[email protected] >> <javascript:>>wrote: >> >>> 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 >>> <[email protected]<javascript:> >>> > 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 [email protected] <javascript:>. >>>> >>>> To post to this group, send email to >>>> [email protected]<javascript:> >>>> . >>>> 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 a topic in the >>> Google Groups "Django developers" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/django-developers/PWPj3etj3-U/unsubscribe >>> . >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected] <javascript:>. >>> >>> To post to this group, send email to >>> [email protected]<javascript:> >>> . >>> 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<https://groups.google.com/d/msgid/django-developers/CAFwN1urwhyZkfF9smfeeSOeS_8ejFdKmKo3X%3D4yfWd8DGU_%3DTA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> ------------------------------ >> Harry J.W. Percival >> ------------------------------ >> Twitter: @hjwp >> Mobile: +44 (0) 78877 02511 >> Skype: harry.percival >> >> -- >> 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 [email protected] <javascript:>. >> To post to this group, send email to >> [email protected]<javascript:> >> . >> 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/CACFvh99EEyphjkE7%2BY7GawvkvhRNRrAVPOebj17T-OT8Z3HpBA%40mail.gmail.com<https://groups.google.com/d/msgid/django-developers/CACFvh99EEyphjkE7%2BY7GawvkvhRNRrAVPOebj17T-OT8Z3HpBA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> 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 [email protected]. To post to this group, send email to [email protected]. 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/af5dcc60-b821-4edb-9efd-7963e3977a33%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
