-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.py
More file actions
34 lines (23 loc) · 738 Bytes
/
config.py
File metadata and controls
34 lines (23 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""Flask configuration variables."""
from os import environ, path
from dotenv import load_dotenv
basedir = path.abspath(path.dirname(__file__))
load_dotenv(path.join(basedir, ".env"))
class Config:
"""Set Flask configuration from .env file."""
# General Config
APPLICATION_NAME = "flaskassets"
ENVIRONMENT = environ.get("ENVIRONMENT")
# Flask Config
FLASK_APP = "wsgi.py"
SECRET_KEY = environ.get("SECRET_KEY")
FLASK_DEBUG = environ.get("FLASK_DEBUG")
# Flask-Assets
LESS_BIN = environ.get("LESS_BIN")
ASSETS_DEBUG = True
LESS_RUN_IN_DEBUG = True
# Static Assets
STATIC_FOLDER = "static"
TEMPLATES_FOLDER = "templates"
COMPRESSOR_DEBUG = True
settings = Config()