Prepare for app factory [1 of 2] (#315)

* Move db, assets, debug toolbar and fix_paginate into nyaa.extensions
* Change all `from nyaa import db` imports to `from nyaa.extensions import db`
* Move `nyaa.torrents.create_magnet_from_es_info` context processor into template-utils blueprint
* Fix tools (wrap in `with app.app_context():` where needed)
This commit is contained in:
Kfir Hadas
2017-07-30 20:35:16 +03:00
committed by GitHub
parent 1dae331156
commit 0181d6cb33
16 changed files with 121 additions and 98 deletions

View File

@@ -7,7 +7,8 @@ from werkzeug import secure_filename
from orderedset import OrderedSet
from nyaa import app, db, models, utils
from nyaa import app, models, utils
from nyaa.extensions import db
@utils.cached_function