def welcome_view(self):
# Check whether the site is setup?
if not "properties" in self.request.root.__dict__:
print "Need to setup site!"
return HTTPFound(location=self.request.route_path("setup"))
# If queue enabled, deal with it
elif not self.has_queued:
return HTTPFound(location=self.request.route_path("queue"))
# Check queue/active status
elif Queue(self.request).timed_out():
return HTTPFound(self.request.route_path("purchase_timeout"))
elif "user_id" in self.request.session and self.request.session["user_id"] in self.context.users:
return HTTPFound(location=self.request.route_path("branch_flow"))
return {}
评论列表
文章目录