mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-16 00:09:05 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user