Commit Graph

11 Commits

Author SHA1 Message Date
Kfir Hadas 87dd95f1e0 Refactor into an app factory [2 of 2] (#322)
* Replace all `from nyaa import app` imports with `app = flask.current_app` (or `from flask import current_app as app` where possible)
* Add a separate config object for top-level and class statements as `nyaa.extensions.config`
Required because those codes don't have app context at the time of evaluation/execution.
* Remove `routes.py` file and register all blueprints in `nyaa/__init__.py`
* Refactor `nyaa/__init__.py` into an app factory
* Update tools
* Update tests (temporary, will be replaced)
2017-08-01 21:02:08 +03:00
Kfir Hadas 0181d6cb33 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)
2017-07-30 20:35:16 +03:00
Kfir Hadas b992467dad Apply isort & flake8 (#312)
* Update isort settings
* Apply import sorting (isort) on all files in nyaa/
* Fixed Flake8 errors in nyaa/ (see PR for list)
* Add isort to lint.sh and requirements.txt
2017-07-28 20:01:19 +03:00
Kfir Hadas 16e72a2a9c set noqa to ignore a single error 2017-06-08 04:14:04 +03:00
TheAMM 260dc2cdc8 Forbid caching when debugging 2017-05-27 21:33:20 +03:00
nyaadev 76812b0ef0 utf8mb4 for database connection 2017-05-23 00:46:26 +02:00
katnyaa 1016d5be02 Fix typo 2017-05-22 13:02:02 +00:00
sharkykh 571b7f2930 Ignore routes import line 2017-05-16 12:43:33 +03:00
sharkykh 2a71fd8158 Display the site's commit hash 2017-05-14 12:02:39 +03:00
nyaadev 064c33ecf4 Fix cookies messing with cache
Change Display name to Torrent display name for clarity
2017-05-13 19:26:43 +02:00
nyaadev 00d65e312c Initial commit. 2017-05-12 20:51:49 +02:00