comparison bio/models.py @ 789:9e803323a0d0

Removing AUTH_PROFILE_MODULE and get_profile().
author Brian Neal <bgneal@gmail.com>
date Fri, 23 May 2014 15:10:11 -0500
parents ddc189ff96bb
children 0b6bf9c5a982
comparison
equal deleted inserted replaced
788:84aa49497718 789:9e803323a0d0
76 76
77 77
78 class UserProfile(models.Model): 78 class UserProfile(models.Model):
79 """model to represent additional information about users""" 79 """model to represent additional information about users"""
80 80
81 user = models.ForeignKey(User, unique=True) 81 user = models.OneToOneField(User, related_name='profile')
82 location = models.CharField(max_length=128, blank=True) 82 location = models.CharField(max_length=128, blank=True)
83 country = models.CharField(max_length=2, blank=True, default='', 83 country = models.CharField(max_length=2, blank=True, default='',
84 choices=bio.flags.FLAG_CHOICES, 84 choices=bio.flags.FLAG_CHOICES,
85 help_text='Optional') 85 help_text='Optional')
86 birthday = models.DateField(blank=True, null=True, 86 birthday = models.DateField(blank=True, null=True,