From 1994e1e1a2e0c22d2d2a00b69bcda00844924a63 Mon Sep 17 00:00:00 2001 From: spl0k Date: Thu, 5 Sep 2013 18:40:43 +0200 Subject: [PATCH] *Manager classes get their own package --- api/__init__.py | 2 +- api/user.py | 2 +- cli.py | 2 +- folder.py | 4 ++-- managers/__init__.py | 0 folder_manager.py => managers/folder.py | 0 user_manager.py => managers/user.py | 0 user.py | 2 +- web.py | 2 +- 9 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 managers/__init__.py rename folder_manager.py => managers/folder.py (100%) rename user_manager.py => managers/user.py (100%) diff --git a/api/__init__.py b/api/__init__.py index 678915b..a650c27 100755 --- a/api/__init__.py +++ b/api/__init__.py @@ -6,7 +6,7 @@ import cgi import uuid from web import app -from user_manager import UserManager +from managers.user import UserManager @app.before_request def set_formatter(): diff --git a/api/user.py b/api/user.py index 1843a1b..873ab4b 100755 --- a/api/user.py +++ b/api/user.py @@ -3,7 +3,7 @@ from flask import request from web import app from db import User -from user_manager import UserManager +from managers.user import UserManager @app.route('/rest/getUser.view', methods = [ 'GET', 'POST' ]) def user_info(): diff --git a/cli.py b/cli.py index a03fa8a..79a29e5 100755 --- a/cli.py +++ b/cli.py @@ -75,7 +75,7 @@ if __name__ == "__main__": import db db.init_db() - from folder_manager import FolderManager + from managers.folder import FolderManager from scanner import Scanner if len(sys.argv) > 1: diff --git a/folder.py b/folder.py index b11782b..a536d12 100755 --- a/folder.py +++ b/folder.py @@ -7,8 +7,8 @@ import uuid from web import app from db import session, Folder from scanner import Scanner -from user_manager import UserManager -from folder_manager import FolderManager +from managers.user import UserManager +from managers.folder import FolderManager @app.before_request def check_admin(): diff --git a/managers/__init__.py b/managers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/folder_manager.py b/managers/folder.py similarity index 100% rename from folder_manager.py rename to managers/folder.py diff --git a/user_manager.py b/managers/user.py similarity index 100% rename from user_manager.py rename to managers/user.py diff --git a/user.py b/user.py index 99172b2..932f036 100755 --- a/user.py +++ b/user.py @@ -3,7 +3,7 @@ from flask import request, session, flash, render_template, redirect, url_for, make_response from web import app -from user_manager import UserManager +from managers.user import UserManager from db import User, session as db_sess import uuid, csv import config diff --git a/web.py b/web.py index c2a1283..6f950a1 100755 --- a/web.py +++ b/web.py @@ -14,7 +14,7 @@ if config.get('base', 'log_file'): app.logger.addHandler(handler) import db -from user_manager import UserManager +from managers.user import UserManager @app.before_request def init_and_login_check():