mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-30 15:04:18 +00:00
Get the secret key from envvars
This commit is contained in:
parent
cdcbc6dfae
commit
567d0e0979
1 changed files with 2 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
import typing
|
import typing
|
||||||
import flask as f
|
import flask as f
|
||||||
|
import os
|
||||||
from ..database import Alchemy
|
from ..database import Alchemy
|
||||||
from .royalprint import Royalprint
|
from .royalprint import Royalprint
|
||||||
|
|
||||||
|
@ -7,6 +8,7 @@ from .royalprint import Royalprint
|
||||||
def create_app(config_obj: typing.Type, blueprints: typing.List[Royalprint]):
|
def create_app(config_obj: typing.Type, blueprints: typing.List[Royalprint]):
|
||||||
app = f.Flask(__name__)
|
app = f.Flask(__name__)
|
||||||
app.config.from_object(config_obj)
|
app.config.from_object(config_obj)
|
||||||
|
app.secret_key = os.environ["SECRET_KEY"]
|
||||||
required_tables = set()
|
required_tables = set()
|
||||||
for blueprint in blueprints:
|
for blueprint in blueprints:
|
||||||
required_tables = required_tables.union(blueprint.required_tables)
|
required_tables = required_tables.union(blueprint.required_tables)
|
||||||
|
|
Loading…
Reference in a new issue