示例#1
0
文件: post.py 项目: JingyanZ/reddit
    def POST_reg(self, dest, *a, **kw):
        ApiController._handle_register(self, *a, **kw)
        c.render_style = "html"
        response.content_type = "text/html"

        if c.errors:
            return LoginPage(user_reg = request.POST.get('user'),
                             dest = dest).render()

        if hsts_eligible():
            dest = hsts_modify_redirect(dest)
        return self.redirect(dest)
示例#2
0
文件: post.py 项目: tonydot28/reddit
    def POST_reg(self, dest, *a, **kw):
        ApiController._handle_register(self, *a, **kw)
        c.render_style = "html"
        response.content_type = "text/html"

        if c.errors:
            return LoginPage(user_reg=request.POST.get('user'),
                             dest=dest).render()

        if hsts_eligible():
            dest = hsts_modify_redirect(dest)
        return self.redirect(dest)