This repository has been archived on 2022-02-23. You can view files and clone it, but cannot push or open issues or pull requests.
lets/handlers/redirectHandler.py
2018-12-09 00:15:56 -05:00

15 lines
363 B
Python

import tornado.web
import tornado.gen
from common.web import requestsManager
class handler(requestsManager.asyncRequestHandler):
def initialize(self, destination):
self.destination = destination
@tornado.web.asynchronous
@tornado.gen.engine
def asyncGet(self, args=()):
self.set_status(302)
self.add_header("location", self.destination.format(args))