]> git.ipfire.org Git - ipfire.org.git/commitdiff
web: base: Drop unused imports
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Oct 2018 16:41:59 +0000 (17:41 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Oct 2018 16:49:52 +0000 (17:49 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/__init__.py
src/web/handlers.py

index 96a97448dc6100091160275508896acafb3c6f82..63c059cc08a478a0f75dd1bcb096ff401265b631 100644 (file)
@@ -86,7 +86,7 @@ class Application(tornado.web.Application):
                        },
 
                        # Call this when a page wasn't found
-                       "default_handler_class" : NotFoundHandler,
+                       "default_handler_class" : base.NotFoundHandler,
                }
                settings.update(kwargs)
 
@@ -130,10 +130,10 @@ class Application(tornado.web.Application):
                        (r"/(de|en)/(.*)", LangCompatHandler),
 
                        # Export arbitrary error pages
-                       (r"/error/([45][0-9]{2})", ErrorHandler),
+                       (r"/error/([45][0-9]{2})", base.ErrorHandler),
 
                        # Block page
-                       (r"/blocked", BlockedHandler),
+                       (r"/blocked", base.BlockedHandler),
                ])
 
                # blog.ipfire.org
index 2aacd35813a672541a5cf8d4c0a798de6f7b4895..47758256a3c30ef3039e6f4f31a5613d43d71044 100644 (file)
@@ -1,20 +1,8 @@
 #!/usr/bin/python
 
-#import httplib
 import iso3166
-#import logging
-#import markdown2
-import operator
-import os
-#import random
-#import re
-#import socket
-#import time
-#import tornado.database
-#import tornado.locale
 import tornado.gen
 import tornado.web
-#import unicodedata
 
 from . import base
 
@@ -22,10 +10,8 @@ from .handlers_boot import *
 from .handlers_fireinfo import *
 from .handlers_iuse import *
 from .handlers_mirrors import *
-from .handlers_nopaste import *
-from .handlers_talk import *
 
-class LangCompatHandler(BaseHandler):
+class LangCompatHandler(base.BaseHandler):
        """
                Redirect links in the old format to current site:
 
@@ -35,7 +21,7 @@ class LangCompatHandler(BaseHandler):
                self.redirect("/%s" % page)
 
 
-class IndexHandler(BaseHandler):
+class IndexHandler(base.BaseHandler):
        """
                This handler displays the welcome page.
        """
@@ -53,7 +39,7 @@ class IndexHandler(BaseHandler):
                        latest_release=latest_release)
 
 
-class DonateHandler(BaseHandler):
+class DonateHandler(base.BaseHandler):
        def get(self):
                location = self.get_remote_location()
 
@@ -134,7 +120,7 @@ class DonateHandler(BaseHandler):
                self.redirect(redirect_url)
 
 
-class StaticHandler(BaseHandler):
+class StaticHandler(base.BaseHandler):
        def initialize(self, template):
                self._template = template