Nice, thanks for the pointer!  Now I have one for you:
https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.update_or_create
Right below the function link you sent me :)

I think that'll do the trick :)