From 8e26a72bc9c8d496931aa6f84580a9da73e4ec4a Mon Sep 17 00:00:00 2001 From: Mattia Succurro Date: Thu, 10 Oct 2019 19:31:36 +0200 Subject: [PATCH] Split config from app; some style changes --- app.py | 8 ++------ config.py | 4 ++++ static/style.css | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 config.py diff --git a/app.py b/app.py index cec076b..7e13a29 100644 --- a/app.py +++ b/app.py @@ -8,14 +8,10 @@ from functools import wraps __version__ = '0.4-dev' -DATABASE = 'coriplus.sqlite' -DEBUG = True -SECRET_KEY = 'hin6bab8ge25*r=x&+5$0kn=-#log$pt^#@vrqjld!^2ci@g*b' - app = Flask(__name__) -app.config.from_object(__name__) +app.config.from_pyfile('config.py') -database = SqliteDatabase(DATABASE) +database = SqliteDatabase(app.config['DATABASE']) class BaseModel(Model): class Meta: diff --git a/config.py b/config.py new file mode 100644 index 0000000..c4ae536 --- /dev/null +++ b/config.py @@ -0,0 +1,4 @@ +DATABASE = 'coriplus.sqlite' +DEBUG = True +SECRET_KEY = 'hin6bab8ge25*r=x&+5$0kn=-#log$pt^#@vrqjld!^2ci@g*b' + diff --git a/static/style.css b/static/style.css index 5e7b4b9..7e56f1d 100644 --- a/static/style.css +++ b/static/style.css @@ -9,3 +9,6 @@ body{margin:0} .flash{background-color:#ff9;border:yellow 1px solid} .message-visual img{max-width:100%;max-height:8em} .create_text{width:100%;height:8em} +.follow_button,input[type="submit"]{background-color:#ff3018;color:white;border-radius:3px;border:1px solid #ff3018} +.follow_button.following{background-color:transparent;color:#ff3018;border-color:#ff3018} +