CleanUP before Update

This commit is contained in:
App Generator
2021-11-10 17:03:57 +02:00
parent 19f133a1ef
commit 94e62b6ea9
226 changed files with 0 additions and 42346 deletions

38
run.py
View File

@ -1,38 +0,0 @@
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from flask_migrate import Migrate
from os import environ
from sys import exit
from decouple import config
import logging
from config import config_dict
from app import create_app, db
# WARNING: Don't run with debug turned on in production!
DEBUG = config('DEBUG', default=True, cast=bool)
# The configuration
get_config_mode = 'Debug' if DEBUG else 'Production'
try:
# Load the configuration using the default values
app_config = config_dict[get_config_mode.capitalize()]
except KeyError:
exit('Error: Invalid <config_mode>. Expected values [Debug, Production] ')
app = create_app( app_config )
Migrate(app, db)
if DEBUG:
app.logger.info('DEBUG = ' + str(DEBUG) )
app.logger.info('Environment = ' + get_config_mode )
app.logger.info('DBMS = ' + app_config.SQLALCHEMY_DATABASE_URI )
if __name__ == "__main__":
app.run()