From 98843516f7595de3ca6ce45e31e5f06f9b420f97 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 5 Jun 2015 23:34:04 +0200 Subject: [PATCH] Reorganization. --- app.py => accountant/__init__.py | 8 ++++---- {api => accountant/api}/__init__.py | 0 {api => accountant/api}/controller/__init__.py | 0 {api => accountant/api}/controller/accounts.py | 0 {api => accountant/api}/controller/entries.py | 0 .../api}/controller/scheduled_operations.py | 0 {api => accountant/api}/controller/users.py | 0 {api => accountant/api}/model/__init__.py | 0 {api => accountant/api}/model/accounts.py | 0 {api => accountant/api}/model/entries.py | 0 {api => accountant/api}/model/operations.py | 0 .../api}/model/scheduled_operations.py | 0 config.py.dist => accountant/config.py.dist | 0 {frontend => accountant/frontend}/__init__.py | 0 .../frontend}/static/css/main.css | 0 .../frontend}/static/js/accounts.js | 0 .../frontend}/static/js/entries.js | 0 .../frontend}/static/js/months.js | 0 .../frontend}/static/js/scheduler.js | 0 .../frontend}/static/templates/account_edit.html | 0 .../frontend}/static/templates/account_new.html | 0 .../frontend}/static/templates/account_remove.html | 0 .../static/templates/operation_remove.html | 0 .../pines-notify/jquery.pnotify.default.css | 0 .../third-party/pines-notify/jquery.pnotify.js | 0 .../third-party/pines-notify/jquery.pnotify.min.js | 0 .../static/third-party/pines-notify/pnotify.zip | Bin .../frontend}/templates/index.html | 0 .../frontend}/templates/layout.html | 0 .../frontend}/templates/remove_entry.html | 0 .../frontend}/templates/scheduler.html | 0 manage.py | 5 +++-- 32 files changed, 7 insertions(+), 6 deletions(-) rename app.py => accountant/__init__.py (92%) rename {api => accountant/api}/__init__.py (100%) rename {api => accountant/api}/controller/__init__.py (100%) rename {api => accountant/api}/controller/accounts.py (100%) rename {api => accountant/api}/controller/entries.py (100%) rename {api => accountant/api}/controller/scheduled_operations.py (100%) rename {api => accountant/api}/controller/users.py (100%) rename {api => accountant/api}/model/__init__.py (100%) rename {api => accountant/api}/model/accounts.py (100%) rename {api => accountant/api}/model/entries.py (100%) rename {api => accountant/api}/model/operations.py (100%) rename {api => accountant/api}/model/scheduled_operations.py (100%) rename config.py.dist => accountant/config.py.dist (100%) rename {frontend => accountant/frontend}/__init__.py (100%) rename {frontend => accountant/frontend}/static/css/main.css (100%) rename {frontend => accountant/frontend}/static/js/accounts.js (100%) rename {frontend => accountant/frontend}/static/js/entries.js (100%) rename {frontend => accountant/frontend}/static/js/months.js (100%) rename {frontend => accountant/frontend}/static/js/scheduler.js (100%) rename {frontend => accountant/frontend}/static/templates/account_edit.html (100%) rename {frontend => accountant/frontend}/static/templates/account_new.html (100%) rename {frontend => accountant/frontend}/static/templates/account_remove.html (100%) rename {frontend => accountant/frontend}/static/templates/operation_remove.html (100%) rename {frontend => accountant/frontend}/static/third-party/pines-notify/jquery.pnotify.default.css (100%) rename {frontend => accountant/frontend}/static/third-party/pines-notify/jquery.pnotify.js (100%) rename {frontend => accountant/frontend}/static/third-party/pines-notify/jquery.pnotify.min.js (100%) rename {frontend => accountant/frontend}/static/third-party/pines-notify/pnotify.zip (100%) rename {frontend => accountant/frontend}/templates/index.html (100%) rename {frontend => accountant/frontend}/templates/layout.html (100%) rename {frontend => accountant/frontend}/templates/remove_entry.html (100%) rename {frontend => accountant/frontend}/templates/scheduler.html (100%) diff --git a/app.py b/accountant/__init__.py similarity index 92% rename from app.py rename to accountant/__init__.py index 3c8d227..9964e2d 100644 --- a/app.py +++ b/accountant/__init__.py @@ -15,14 +15,14 @@ along with Accountant. If not, see . """ -from api import api +from .api import api #from api.controller import login_manager -from api.model import db +from .api.model import db from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy -from frontend import frontend +from .frontend import frontend from sqlalchemy.orm import sessionmaker -import config +from . import config # The app app = Flask(__name__, static_folder = None) diff --git a/api/__init__.py b/accountant/api/__init__.py similarity index 100% rename from api/__init__.py rename to accountant/api/__init__.py diff --git a/api/controller/__init__.py b/accountant/api/controller/__init__.py similarity index 100% rename from api/controller/__init__.py rename to accountant/api/controller/__init__.py diff --git a/api/controller/accounts.py b/accountant/api/controller/accounts.py similarity index 100% rename from api/controller/accounts.py rename to accountant/api/controller/accounts.py diff --git a/api/controller/entries.py b/accountant/api/controller/entries.py similarity index 100% rename from api/controller/entries.py rename to accountant/api/controller/entries.py diff --git a/api/controller/scheduled_operations.py b/accountant/api/controller/scheduled_operations.py similarity index 100% rename from api/controller/scheduled_operations.py rename to accountant/api/controller/scheduled_operations.py diff --git a/api/controller/users.py b/accountant/api/controller/users.py similarity index 100% rename from api/controller/users.py rename to accountant/api/controller/users.py diff --git a/api/model/__init__.py b/accountant/api/model/__init__.py similarity index 100% rename from api/model/__init__.py rename to accountant/api/model/__init__.py diff --git a/api/model/accounts.py b/accountant/api/model/accounts.py similarity index 100% rename from api/model/accounts.py rename to accountant/api/model/accounts.py diff --git a/api/model/entries.py b/accountant/api/model/entries.py similarity index 100% rename from api/model/entries.py rename to accountant/api/model/entries.py diff --git a/api/model/operations.py b/accountant/api/model/operations.py similarity index 100% rename from api/model/operations.py rename to accountant/api/model/operations.py diff --git a/api/model/scheduled_operations.py b/accountant/api/model/scheduled_operations.py similarity index 100% rename from api/model/scheduled_operations.py rename to accountant/api/model/scheduled_operations.py diff --git a/config.py.dist b/accountant/config.py.dist similarity index 100% rename from config.py.dist rename to accountant/config.py.dist diff --git a/frontend/__init__.py b/accountant/frontend/__init__.py similarity index 100% rename from frontend/__init__.py rename to accountant/frontend/__init__.py diff --git a/frontend/static/css/main.css b/accountant/frontend/static/css/main.css similarity index 100% rename from frontend/static/css/main.css rename to accountant/frontend/static/css/main.css diff --git a/frontend/static/js/accounts.js b/accountant/frontend/static/js/accounts.js similarity index 100% rename from frontend/static/js/accounts.js rename to accountant/frontend/static/js/accounts.js diff --git a/frontend/static/js/entries.js b/accountant/frontend/static/js/entries.js similarity index 100% rename from frontend/static/js/entries.js rename to accountant/frontend/static/js/entries.js diff --git a/frontend/static/js/months.js b/accountant/frontend/static/js/months.js similarity index 100% rename from frontend/static/js/months.js rename to accountant/frontend/static/js/months.js diff --git a/frontend/static/js/scheduler.js b/accountant/frontend/static/js/scheduler.js similarity index 100% rename from frontend/static/js/scheduler.js rename to accountant/frontend/static/js/scheduler.js diff --git a/frontend/static/templates/account_edit.html b/accountant/frontend/static/templates/account_edit.html similarity index 100% rename from frontend/static/templates/account_edit.html rename to accountant/frontend/static/templates/account_edit.html diff --git a/frontend/static/templates/account_new.html b/accountant/frontend/static/templates/account_new.html similarity index 100% rename from frontend/static/templates/account_new.html rename to accountant/frontend/static/templates/account_new.html diff --git a/frontend/static/templates/account_remove.html b/accountant/frontend/static/templates/account_remove.html similarity index 100% rename from frontend/static/templates/account_remove.html rename to accountant/frontend/static/templates/account_remove.html diff --git a/frontend/static/templates/operation_remove.html b/accountant/frontend/static/templates/operation_remove.html similarity index 100% rename from frontend/static/templates/operation_remove.html rename to accountant/frontend/static/templates/operation_remove.html diff --git a/frontend/static/third-party/pines-notify/jquery.pnotify.default.css b/accountant/frontend/static/third-party/pines-notify/jquery.pnotify.default.css similarity index 100% rename from frontend/static/third-party/pines-notify/jquery.pnotify.default.css rename to accountant/frontend/static/third-party/pines-notify/jquery.pnotify.default.css diff --git a/frontend/static/third-party/pines-notify/jquery.pnotify.js b/accountant/frontend/static/third-party/pines-notify/jquery.pnotify.js similarity index 100% rename from frontend/static/third-party/pines-notify/jquery.pnotify.js rename to accountant/frontend/static/third-party/pines-notify/jquery.pnotify.js diff --git a/frontend/static/third-party/pines-notify/jquery.pnotify.min.js b/accountant/frontend/static/third-party/pines-notify/jquery.pnotify.min.js similarity index 100% rename from frontend/static/third-party/pines-notify/jquery.pnotify.min.js rename to accountant/frontend/static/third-party/pines-notify/jquery.pnotify.min.js diff --git a/frontend/static/third-party/pines-notify/pnotify.zip b/accountant/frontend/static/third-party/pines-notify/pnotify.zip similarity index 100% rename from frontend/static/third-party/pines-notify/pnotify.zip rename to accountant/frontend/static/third-party/pines-notify/pnotify.zip diff --git a/frontend/templates/index.html b/accountant/frontend/templates/index.html similarity index 100% rename from frontend/templates/index.html rename to accountant/frontend/templates/index.html diff --git a/frontend/templates/layout.html b/accountant/frontend/templates/layout.html similarity index 100% rename from frontend/templates/layout.html rename to accountant/frontend/templates/layout.html diff --git a/frontend/templates/remove_entry.html b/accountant/frontend/templates/remove_entry.html similarity index 100% rename from frontend/templates/remove_entry.html rename to accountant/frontend/templates/remove_entry.html diff --git a/frontend/templates/scheduler.html b/accountant/frontend/templates/scheduler.html similarity index 100% rename from frontend/templates/scheduler.html rename to accountant/frontend/templates/scheduler.html diff --git a/manage.py b/manage.py index 4bfd013..0b29e2d 100755 --- a/manage.py +++ b/manage.py @@ -1,7 +1,8 @@ +#!/usr/bin/env python from flask.ext.script import Manager -from flask.ext.migrate import Migrate, MigrateCommand +from flask.ext.migrate import MigrateCommand -from app import app +from accountant import app manager = Manager(app) manager.add_command('db', MigrateCommand)