def PostContext(self, **kwargs): uid = int(kwargs.get("uid", 0)) if self.HasPostData("ok"): username = self.GetPostData("username") password = self.GetPostData("password") email = self.GetPostData("email") user = User.objects.create_user(username, email, password) user.first_name = username user.save() profile = UserProfile(user=user) profile.nickname = user.username profile.save() self.redirectUrl = "/" return locals()
def createUserProfile(user): profile = UserProfile(user=user) profile.nickname = user.username profile.save()
def createUserProfile(user): profile=UserProfile(user=user) profile.nickname=user.username profile.save()