Thursday, October 8, 2015

Re: how to copy data per user

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 models  from 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+unsubscribe@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.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment