Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chiefs
ChiefSend
Commits
30839b9c
Commit
30839b9c
authored
Oct 02, 2020
by
Lukas Böhm
Browse files
use .env
parent
f83570f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/__init__.py
View file @
30839b9c
...
...
@@ -2,12 +2,10 @@ import os
from
flask
import
Flask
from
flask_sqlalchemy
import
SQLAlchemy
basedir
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
app
=
Flask
(
__name__
)
app
.
config
[
'SECRET_KEY'
]
=
'jonas ist ein kek'
app
.
config
[
'MEDIA_LOCATION'
]
=
os
.
path
.
join
(
basedir
,
'
media'
)
app
.
config
[
'SQLALCHEMY_DATABASE_URI'
]
=
'sqlite:///C:/Users/Lukas/Documents/chiefsend/home.db'
app
.
config
[
'SECRET_KEY'
]
=
os
.
getenv
(
'SECRET_KEY'
)
or
'jonas ist ein kek'
app
.
config
[
'MEDIA_LOCATION'
]
=
os
.
getenv
(
'MEDIA_LOCATION'
)
or
'C:/Users/Lukas/Documents/chiefsend/
media'
app
.
config
[
'SQLALCHEMY_DATABASE_URI'
]
=
os
.
getenv
(
'DATABASE_URI'
)
or
'sqlite:///C:/Users/Lukas/Documents/chiefsend/home.db'
app
.
config
[
'SQLALCHEMY_TRACK_MODIFICATIONS'
]
=
False
app
.
config
[
'MAX_MEDIA_SIZE'
]
=
1000
*
1024
*
1024
# 1000 MB
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment