Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -instance
- -config.py
- -service
- -__init__.py
- -auth.py
- -db.py
- -tables.sql
- -venv
- class DefaultConfig(object):
- DEBUG = True
- TESTING = False
- SECRET_KEY = 'this-really-needs-to-be-changed'
- HOST = "localhost"
- USER = "root"
- PASSWD = "hello"
- DB = "testdb"
- class ProductionConfig(DefaultConfig):
- DEBUG = False
- import os
- from flask import Flask
- def create_app(config=None):
- # create and configure the app
- app = Flask(__name__, instance_relative_config=True)
- app.config.from_object('config.ProductionConfig')
- try:
- os.makedirs(app.instance_path)
- except OSError:
- pass
- from . import db
- db.init_app(app)
- from . import auth
- app.register_blueprint(auth.bp)
- return app
- Debugged import:
- - 'config' not found.
- Original exception:
- ModuleNotFoundError: No module named 'config'
Add Comment
Please, Sign In to add comment