You end up with alot of cases where you could create a pure django user with a
username that
would then collide with a google user's nickname, making there registration
impossible. Seems
like it makes more sense to use the user.email() as the username, as chance of
collision is far
lower.
class User(GoogleUserTraits):
"""User class that provides support for Django and Google Accounts."""
user = db.UserProperty()
username = db.StringProperty(required=True, verbose_name=_('username'))
email = db.EmailProperty(verbose_name=_('e-mail address'))
first_name = db.StringProperty(verbose_name=_('first name'))
last_name = db.StringProperty(verbose_name=_('last name'))
class Meta:
verbose_name = _('user')
verbose_name_plural = _('users')
@classmethod
def create_djangouser_for_user(cls, user):
#return cls(user=user, email=user.email(), username=user.nickname())
return cls(user=user, email=user.email(), username=user.email())
Original issue reported on code.google.com by fuma...@gmail.com on 2 Apr 2009 at 1:29
Original issue reported on code.google.com by
fuma...@gmail.com
on 2 Apr 2009 at 1:29