Tidied up code

This commit is contained in:
Vivek Santayana 2022-06-19 11:17:00 +01:00
parent 2e00d503c8
commit 6d5f74bd62
4 changed files with 6 additions and 9 deletions

View File

@ -28,10 +28,10 @@ class Config(object):
MAIL_SUPPRESS_SEND = False MAIL_SUPPRESS_SEND = False
MAIL_ASCII_ATTACHMENTS = bool(os.getenv('MAIL_ASCII_ATTACHMENTS')) MAIL_ASCII_ATTACHMENTS = bool(os.getenv('MAIL_ASCII_ATTACHMENTS'))
class ProductionConfig(Config): class Production(Config):
pass pass
class DevelopmentConfig(Config): class Development(Config):
APP_HOST = '127.0.0.1' APP_HOST = '127.0.0.1'
DEBUG = True DEBUG = True
SESSION_COOKIE_SECURE = False SESSION_COOKIE_SECURE = False
@ -39,7 +39,7 @@ class DevelopmentConfig(Config):
MAIL_DEBUG = True MAIL_DEBUG = True
MAIL_SUPPRESS_SEND = False MAIL_SUPPRESS_SEND = False
class TestingConfig(DevelopmentConfig): class Testing(Development):
TESTING = True TESTING = True
SESSION_COOKIE_SECURE = False SESSION_COOKIE_SECURE = False
MAIL_SERVER = os.getenv('MAIL_SERVER') MAIL_SERVER = os.getenv('MAIL_SERVER')

View File

@ -1 +1 @@
from app.config import ProductionConfig as Config from app.config import Production as Config

View File

@ -80,5 +80,4 @@ def create_app():
app = create_app() app = create_app()
if __name__ == '__main__': if __name__ == '__main__': app.run()
app.run()

View File

@ -1,4 +1,2 @@
from main import app from main import app
if __name__ == '__main__': app.run()
if __name__ == '__main__':
app.run()