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

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

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