This commit is contained in:
deflax 2017-03-09 18:44:20 +02:00
parent 360b4d7b21
commit bfb76658d1
4 changed files with 5 additions and 8 deletions

View file

@ -26,8 +26,8 @@ mail = Mail()
mail.init_app(app)
bootstrap = Bootstrap()
bootstrap.init_app(app)
csrf = CSRFProtect()
csrf.init_app(app)
csrf = CSRFProtect(app)
#csrf.init_app(app)
babel = Babel()
babel.init_app(app)
@ -57,7 +57,7 @@ app.json_encoder = CustomJSONEncoder
if not app.debug:
import logging
from logging.handlers import RotatingFileHandler
file_handler = RotatingFileHandler('log/proxadmin.log', 'a', 1 * 1024 * 1024, 10)
file_handler = RotatingFileHandler('/home/proxadmin/appserver/proxadmin/app/log/proxadmin.log', 'a', 1 * 1024 * 1024, 10)
file_handler.setLevel(logging.INFO)
file_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s: %(message)s [in %(pathname)s:%(lineno)d]'))
app.logger.addHandler(file_handler)

View file

@ -15,6 +15,7 @@ def make_shell_context():
Deployment=Deployment)
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('shell', Shell(make_context=make_shell_context))
manager.add_command('db', MigrateCommand)

4
run.py
View file

@ -1,4 +0,0 @@
from app import app
if __name__ == '__main__':
app.run()

View file

@ -15,6 +15,6 @@ activate_this = '/home/proxadmin/appserver/bin/activate_this.py'
with open(activate_this) as file_:
exec(file_.read(), dict(__file__=activate_this))
sys.path.append('/home/proxadmin/appserver/proxmaster-panel')
sys.path.append('/home/proxadmin/appserver/proxadmin')
from app import app as application