How To Migrate to Angular2

Just back from AngularConnect 2015 in London (October 2015), and I’m enthused about all the great new stuff in Angular 2. Only problem is, everything has changed and I’ve only just got the hang of Angular 1. So, while I prepare to launch my new Angular/Firebase front-end to Luzme which uses Angular1, I want to start skilling myself up with Angular 2, for the next major release. So this is my plan: take it step-by-step, and write about each step so I can share with others on the same journey, and learn from the comments and questions along the way.

Stop Thinking; Start Doing

So you want to start a startup but can’t get past the first hurdle. You can’t decide on your startup idea. You have too many ideas and don’t know how to choose one. Or you have one great idea, but something always gets in the way of you executing it. Sound familiar? The answer is simple. Pick One. Work on it. Learn from it. Your idea will be wrong, almost certainly.

Django: "Cannot add foreign key constraint"

Upgraded to Django 1.8 and now you get this error when you run your tests? Have you created migrations for all your apps? If not, you may well be hitting the problem that the database tables are being created in the wrong order, which will give you this error. If you have an existing Django 1.7 or earlier project, then you need to create the initial migration files, and then fake the initial migration, as described here

WordPress redirect loop on wp-admin

If you change the site URL in WP, it’s possible to lock yourself out of the admin site by virtue of a redirect loop. If you’ve got access to the database, you can revert that change. If not… You can update wp-config.php to override those settings; WP_HOME and WP_SITEURL.

Celery: group, chain & chord: what happens on error?

Found this useful summary in Ask’s reply: Group (runs in parallel): Error on one task does not stop the others Chain (runs in serial): Error on one task halts the chain Chord (group with callback): Error in group prevents callback from firing Update: From Celery 3.0.14, this Chord behaviour is configurable. See CELERY_CHORD_PROPAGATES config option.

John Pinner RIP

I was deeply sad to hear of the untimely death of John Pinner. I met John at PyCon UK a few years ago, and very quickly learnt a great respect for him as a man, a friend, a mentor. I saw him but once a year at the annual PyCon UK conference, and yet he had a great effect on me; I can only imagine the huge void that will be left by his passing for those who knew him more closely.

Review: "Discover Meteor",Tom Coleman & Sacha Greif Currently available at $39 and upwards (May 2014) Check the current live price at Luzme Meteor is a new web framework which promises near-real time data updates on the client. If you’re planning to learn how to learn Meteor (which you should, it’s awesome!), you need this book “Discover Meteor”. The starting price is $39, with higher prices available for the book with extra goodies. However you value your time, you’ll make that price back by the time you’ve got your first Meteor app up and running.

Handling European currencies

For example, ‘15,99 EUR’ See whether you have the right locale installed. $ locale -a If not $ sudo apt-get install language-pack-es $ sudo dpkg-reconfigure locales And then in the code, you can do this import locale myprice = unicode(locale.atof(myprice))

Migrating from django-registration to django-allauth

I’ve been wanting to migrate away from django-registration for a while. Yes, I know it’s been the default registration package since forever and I’ve used it happily for many years. But : * it's no longer actively maintained * I want to do away with the email confirmation * I want to allow login using either email or username So after a bit of googling, I decided to try out django-allauth, and I’ve just finished the migration.