wsgi
This commit is contained in:
parent
360b4d7b21
commit
bfb76658d1
4 changed files with 5 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -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
4
run.py
|
@ -1,4 +0,0 @@
|
|||
from app import app
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue