Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
96fc8f40
Commit
96fc8f40
authored
5 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Load config from 'config.py'.
parent
f6e7b448
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/__init__.py
+8
-1
8 additions, 1 deletion
app/__init__.py
opaque.py
+2
-1
2 additions, 1 deletion
opaque.py
with
10 additions
and
2 deletions
app/__init__.py
+
8
−
1
View file @
96fc8f40
from
config
import
config
from
flask
import
Flask
from
flask
import
Flask
def
create_app
():
def
create_app
(
config_name
):
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
app
.
config
.
from_object
(
config
[
config_name
])
config
[
config_name
].
init_app
(
app
)
@app.route
(
'
/
'
)
def
index
():
return
'
Opaque
'
return
app
return
app
This diff is collapsed.
Click to expand it.
opaque.py
+
2
−
1
View file @
96fc8f40
from
app
import
create_app
from
app
import
create_app
import
os
app
=
create_app
app
=
create_app
(
os
.
getenv
(
'
FLASK_CONFIG
'
)
or
'
default
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment