Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for p_h in Page.versions.filter(version_info__user=other_matt):
- p_h.history_user = matt #Have to set using the direct "history_user" attribute rather than p_h.version_info.user (which doesn't allow mutation)
- p_h.save()
- other_matt_profile = UserProfile.objects.get(user=other_matt)
- other_matt_profile.delete()
- other_matt.delete()
Add Comment
Please, Sign In to add comment