1
0
mirror of https://github.com/enpaul/kodak.git synced 2025-09-18 21:21:59 +00:00

Rename project to imagemuck

This commit is contained in:
2021-05-05 13:48:02 -04:00
parent 6a7662ae0f
commit d92b53a60c
31 changed files with 116 additions and 116 deletions

22
imagemuck/application.py Normal file
View File

@@ -0,0 +1,22 @@
import flask_restful
from imagemuck import resources
from imagemuck._server import ImageMuckFlask
from imagemuck._server import initialize_database
from imagemuck._server import make_the_tea
APPLICATION = ImageMuckFlask(__name__)
API = flask_restful.Api(APPLICATION, catch_all_404s=True)
def _set_upload_limit() -> None:
APPLICATION.config["MAX_CONTENT_LENGTH"] = APPLICATION.appconfig.upload.size_limit
APPLICATION.before_request(make_the_tea)
APPLICATION.before_first_request(initialize_database)
APPLICATION.before_first_request(_set_upload_limit)
for resource in resources.RESOURCES:
API.add_resource(resource, *resource.routes)