From c4f1a618ed3a23283a334397970c12da37a33985 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 11 Oct 2018 12:10:39 +0100 Subject: [PATCH] web: Rename handlers_accounts.py -> accounts.py Signed-off-by: Michael Tremer --- Makefile.am | 2 +- src/web/__init__.py | 3 ++- src/web/{handlers_accounts.py => accounts.py} | 2 +- src/web/handlers.py | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) rename src/web/{handlers_accounts.py => accounts.py} (95%) diff --git a/Makefile.am b/Makefile.am index a6a7a264..5b13675c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -75,11 +75,11 @@ backenddir = $(pythondir)/ipfire web_PYTHON = \ src/web/__init__.py \ + src/web/accounts.py \ src/web/auth.py \ src/web/blog.py \ src/web/download.py \ src/web/handlers.py \ - src/web/handlers_accounts.py \ src/web/handlers_admin.py \ src/web/handlers_base.py \ src/web/handlers_boot.py \ diff --git a/src/web/__init__.py b/src/web/__init__.py index 1ed25397..97a50dec 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -11,6 +11,7 @@ import ipfire from .handlers import * +from . import accounts from . import auth from . import blog from . import download @@ -253,7 +254,7 @@ class Application(tornado.web.Application): # accounts.ipfire.org self.add_handlers(r"accounts(\.dev)?\.ipfire\.org", [ - (r"/avatar/(\w+)\.jpg", AccountsAvatarHandler), + (r"/avatar/(\w+)\.jpg", accounts.AvatarHandler), ]) # admin.ipfire.org diff --git a/src/web/handlers_accounts.py b/src/web/accounts.py similarity index 95% rename from src/web/handlers_accounts.py rename to src/web/accounts.py index 1560eee6..105255fe 100644 --- a/src/web/handlers_accounts.py +++ b/src/web/accounts.py @@ -5,7 +5,7 @@ import tornado.web from . import handlers_base as base -class AccountsAvatarHandler(base.BaseHandler): +class AvatarHandler(base.BaseHandler): def get(self, who): # Get the desired size of the avatar file size = self.get_argument("size", 0) diff --git a/src/web/handlers.py b/src/web/handlers.py index 046d96cc..d2aa3ae7 100644 --- a/src/web/handlers.py +++ b/src/web/handlers.py @@ -16,7 +16,6 @@ import tornado.gen import tornado.web #import unicodedata -from .handlers_accounts import * from .handlers_admin import * from .handlers_base import * from .handlers_boot import * -- 2.39.5