Split config from app; some style changes

This commit is contained in:
Yusur 2019-10-10 19:31:36 +02:00
parent 91b77f1cb0
commit 8e26a72bc9
3 changed files with 9 additions and 6 deletions

8
app.py
View file

@ -8,14 +8,10 @@ from functools import wraps
__version__ = '0.4-dev' __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 = 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 BaseModel(Model):
class Meta: class Meta:

4
config.py Normal file
View file

@ -0,0 +1,4 @@
DATABASE = 'coriplus.sqlite'
DEBUG = True
SECRET_KEY = 'hin6bab8ge25*r=x&+5$0kn=-#log$pt^#@vrqjld!^2ci@g*b'

View file

@ -9,3 +9,6 @@ body{margin:0}
.flash{background-color:#ff9;border:yellow 1px solid} .flash{background-color:#ff9;border:yellow 1px solid}
.message-visual img{max-width:100%;max-height:8em} .message-visual img{max-width:100%;max-height:8em}
.create_text{width:100%;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}