crafty-4/app/classes/web/default_handler.py
luukas 0b3d20ffbe One monster truck commit for
add translation API, add fi_FI and en_EN translations, add C and
.properties file support, check if file is binary before sending and
clean up ajax handler
2021-03-26 15:57:50 +02:00

24 lines
588 B
Python

import logging
from app.classes.web.base_handler import BaseHandler
logger = logging.getLogger(__name__)
class DefaultHandler(BaseHandler):
# Override prepare() instead of get() to cover all possible HTTP methods.
def prepare(self, page=None):
if page is not None:
self.set_status(404)
self.render(
"public/404.html",
translate=self.translator.translate,
)
else:
self.redirect(
"/public/login",
translate=self.translator.translate,
)