Lots of ways to do it. Maybe most efficient is:

UserProfile.objects.filter(user__in=u_dst).update(url=up_src.url,
home_address=up_src.home_address, phone_number=up_src.phone_number)

Where u_dst is a list/tuple/iterable of destination users, and up_src is
the UserProfile of the source user.

On Thu, Oct 8, 2015 at 2:19 AM, Jun Tanaka <tna...@gmail.com> wrote:

> Hello Tim,
>
> 2015年10月7日水曜日 21時36分59秒 UTC+9 Tim Graham:
>>
>> I don't think you've provided enough details about your models for anyone
>> to provide an answer.
>>
>> Probably, you are right. Simply, any model with below for per users is
> fine.
>
> from django.contrib.auth.models import User
>
>
>
> Say something like,
>
>
> from django.db import modelsfrom django.contrib.auth.models import User
>      class UserProfile(models.Model):
>     url = models.URLField()
>     home_address = models.TextField()
>     phone_numer = models.PhoneNumberField()
>     user = models.ForeignKey(User, unique=True)
>
>
> http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/
>
>
>
>> p.s. Django 1.6 is unsupported and has unfixed security vulnerabilities
>> so you should try to upgrade to a supported version.
>> https://www.djangoproject.com/download/#supported-versions
>>
>>
> Thank you for pointing it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6e998fda-8cb3-4c33-b7d3-fae5ef749c0b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/6e998fda-8cb3-4c33-b7d3-fae5ef749c0b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD4ANxW3krEu2-kwidi8kkaADcNgsEV940jdY3kW63YWH4p%3D-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to