Hi, I tried this in the django shell after I changed the line to
user = models.OneToOneField(User, related_name='userprofile') but I get
this error.
>>> import userprofile.models
>>> from django.contrib.auth.models import User
>>> u = User.objects.get(username='test1')
>>> print u
test1
>>> u.
Hi, thanks for the reply. I didn't know about the related_name. I tried
it, did a syncdb witch didn't do anything but still the extra fields
don't save.
On 03/17/2014 06:25 PM, Fabio Caritas Barrionuevo da Luz wrote:
Voyager, Have you tried putting related_name in the Foreign Key?
class U
Voyager, Have you tried putting related_name in the Foreign Key?
> class UserProfile(models.Model):
> # This line is required. Links UserProfile to a User model instance.
> user = models.ForeignKey(User, unique=True,
> *related_name='userprofile'*)
>
>
--
You received this messag
I am trying to extend the user profile according to this page
https://docs.djangoproject.com/en/1.6/topics/auth/customizing/#extending-the-existing-user-model
I am using django-allauth for registration. My problem is that when the
user registers I can't find any new rows in the database. The tab
4 matches
Mail list logo