crafty-4/app/classes/web/default_handler.py

24 lines
628 B
Python
Raw Normal View History

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.
# pylint: disable=arguments-differ
2020-08-23 22:43:28 +00:00
def prepare(self, page=None):
if page is not None:
self.set_status(404)
self.render(
"public/404.html",
translate=self.translator.translate,
)
2020-08-23 22:43:28 +00:00
else:
self.redirect(
"/public/login",
# translate=self.translator.translate,
)