Example #1
0
    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()
Example #2
0
    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()
Example #3
0
def createUserProfile(user):
    profile = UserProfile(user=user)

    profile.nickname = user.username
    profile.save()
Example #4
0
def createUserProfile(user):
    profile=UserProfile(user=user)

    profile.nickname=user.username
    profile.save()