I have a fairly basic Flask app, but for some reason Debug mode wont enable, so whenever I get an error I get a 500 page instead of the nice debug page with the traceback and all that. Here's my app/init.py:
from flask import Flask
from config import config
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
from .main import main as main_blueprint
app.register_blueprint(main_blueprint)
from .api import api as api_blueprint
app.register_blueprint(api_blueprint, url_prefix='/api/v1.0')
return app
and here's my config.py:
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = '12345'
SQL_DRIVER = 'SQL Server Native Client 11.0'
SQL_SERVER = 'WIN8\MSSQL2K12'
SQL_DATABASE = 'LogMe'
SQL_USER = 'LogMe'
SQL_PASSWORD = 'password'
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
config = {
'development' : DevelopmentConfig
}
I've posted the whole project up on GitHub if there happens to be an issue elsewhere, but I assume it's somewhere in these two files: https://github.com/jcaine04/perf-dash/tree/master/app