Skip to content

Instantly share code, notes, and snippets.

@johnboxall
Created January 15, 2009 06:39
Show Gist options
  • Save johnboxall/47295 to your computer and use it in GitHub Desktop.
Save johnboxall/47295 to your computer and use it in GitHub Desktop.
def update_owner(obj, user):
"Change `owner` of all model instances related to `obj` to `user`."
return update_related_field(obj, user, 'owner')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment