From 43f9d78f8c00e13732b809519f0529ac293fd5ab Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Sun, 29 Oct 2023 07:41:04 -0500 Subject: Rename to ustayml (u-stayML) --- flaskr/__init__.py | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 flaskr/__init__.py (limited to 'flaskr/__init__.py') diff --git a/flaskr/__init__.py b/flaskr/__init__.py deleted file mode 100644 index 25c2682..0000000 --- a/flaskr/__init__.py +++ /dev/null @@ -1,44 +0,0 @@ -import os - -from flask import Flask - - -def create_app(test_config=None): - # Create app object. Configuration files are relative to instance folder. - app = Flask(__name__, instance_relative_config=True) - - # Config - app.config.from_mapping( - SECRET_KEY='dev', - DATABASE=os.path.join(app.instance_path, 'flaskr.sqlite'), - ) - - if test_config is None: - app.config.from_pyfile('config.py', silent=True) - else: - app.config.from_mapping(test_config) - - try: - os.makedirs(app.instance_path) - except OSError: - pass - - # Routes - @app.route('/hello') - def hello(): - return 'Hello, World!' - - # Register functions and blueprints - from . import db - db.init_app(app) - - from .views import auth - app.register_blueprint(auth.bp) - - from .views import blog - app.register_blueprint(blog.bp) - - # Extra - app.add_url_rule('/', endpoint='index') - - return app \ No newline at end of file -- cgit v1.2.3