Exemple #1
0
    def post(self):
        params = self.get_params(["username", "email", "password"])
        user = User.save(*params)

        if user:
            log_token = aut.create_and_save_log_token(user)
            self.set_cookies({"username": user.username, "log_token": log_token})
            self.redirect("/")
        else:
            self.redirect("/signup")
Exemple #2
0
    def post(self):
        #TODO: works with non-matching passwords, it shouldn't
        params = self.get_params(["username", "email", "password", "password_confirm"])
        user = User.save(*params)

        if user:
            log_token = aut.create_and_save_log_token(user)
            self.set_cookies({'username':user.username, 'log_token':log_token})
            self.redirect("/")
        else:
            _, errors = valid(*params)
            self.render("signup.html", {'errors': errors})
Exemple #3
0
    def post(self):
        params = self.get_params(["username", "email", "password"])
        user = User.save(*params)

        if user:
            log_token = aut.create_and_save_log_token(user)
            self.set_cookies({
                'username': user.username,
                'log_token': log_token
            })
            self.redirect("/")
        else:
            self.redirect("/signup")
Exemple #4
0
    def post(self):
        #TODO: works with non-matching passwords, it shouldn't
        params = self.get_params(
            ["username", "email", "password", "password_confirm"])
        user = User.save(*params)

        if user:
            log_token = aut.create_and_save_log_token(user)
            self.set_cookies({
                'username': user.username,
                'log_token': log_token
            })
            self.redirect("/")
        else:
            _, errors = valid(*params)
            self.render("signup.html", {'errors': errors})