mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-23 01:16:18 +00:00
*Manager classes get their own package
This commit is contained in:
parent
cb5e7bf2f7
commit
1994e1e1a2
@ -6,7 +6,7 @@ import cgi
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from web import app
|
from web import app
|
||||||
from user_manager import UserManager
|
from managers.user import UserManager
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def set_formatter():
|
def set_formatter():
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from flask import request
|
from flask import request
|
||||||
from web import app
|
from web import app
|
||||||
from db import User
|
from db import User
|
||||||
from user_manager import UserManager
|
from managers.user import UserManager
|
||||||
|
|
||||||
@app.route('/rest/getUser.view', methods = [ 'GET', 'POST' ])
|
@app.route('/rest/getUser.view', methods = [ 'GET', 'POST' ])
|
||||||
def user_info():
|
def user_info():
|
||||||
|
2
cli.py
2
cli.py
@ -75,7 +75,7 @@ if __name__ == "__main__":
|
|||||||
import db
|
import db
|
||||||
db.init_db()
|
db.init_db()
|
||||||
|
|
||||||
from folder_manager import FolderManager
|
from managers.folder import FolderManager
|
||||||
from scanner import Scanner
|
from scanner import Scanner
|
||||||
|
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
|
@ -7,8 +7,8 @@ import uuid
|
|||||||
from web import app
|
from web import app
|
||||||
from db import session, Folder
|
from db import session, Folder
|
||||||
from scanner import Scanner
|
from scanner import Scanner
|
||||||
from user_manager import UserManager
|
from managers.user import UserManager
|
||||||
from folder_manager import FolderManager
|
from managers.folder import FolderManager
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def check_admin():
|
def check_admin():
|
||||||
|
0
managers/__init__.py
Normal file
0
managers/__init__.py
Normal file
2
user.py
2
user.py
@ -3,7 +3,7 @@
|
|||||||
from flask import request, session, flash, render_template, redirect, url_for, make_response
|
from flask import request, session, flash, render_template, redirect, url_for, make_response
|
||||||
|
|
||||||
from web import app
|
from web import app
|
||||||
from user_manager import UserManager
|
from managers.user import UserManager
|
||||||
from db import User, session as db_sess
|
from db import User, session as db_sess
|
||||||
import uuid, csv
|
import uuid, csv
|
||||||
import config
|
import config
|
||||||
|
2
web.py
2
web.py
@ -14,7 +14,7 @@ if config.get('base', 'log_file'):
|
|||||||
app.logger.addHandler(handler)
|
app.logger.addHandler(handler)
|
||||||
|
|
||||||
import db
|
import db
|
||||||
from user_manager import UserManager
|
from managers.user import UserManager
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def init_and_login_check():
|
def init_and_login_check():
|
||||||
|
Loading…
Reference in New Issue
Block a user