I want to connect User to Userprofile. When I create new user, the
Userprofile can't automatically add new user.
Should I need to write create Userprofile on view?
Why the ForeignKey can't automatically add?
My model as below:
class Userprofile(models.Model):
user = models.ForeignKey(User)
image = models.ImageField(_("My
photo"),upload_to="users_image", null=True,
blank=True,default=settings.MEDIA_ROOT
+"users_image/best_bg.jpg")
def __unicode__(self):
return "%s" % self.user
Thanks!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment