Dear django-users
I keep doing patterns like:
has_changed = False
if resource.user.email != request.POST['email']:
resource.user.email = request.POST['email']
has_changed = True
if resource.user.is_active != request.POST['is_active']:
resource.user.is_active = request.POST['is_active']
has_changed = True
if has_changed:
resource.user.save()
although it works, I feel like there is a cleaner solution. How would
you solve such a problem?
Thanks!
Rune
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.