Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sams-classes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
coding-at-fu
sams-classes
Merge requests
!23
Resolve "_flaskApp.secret_key generieren"
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "_flaskApp.secret_key generieren"
36-_flaskapp-secret_key-generieren
into
master
Overview
0
Commits
2
Pipelines
3
Changes
1
Merged
Resolve "_flaskApp.secret_key generieren"
slobinger
requested to merge
36-_flaskapp-secret_key-generieren
into
master
Oct 5, 2017
Overview
0
Commits
2
Pipelines
3
Changes
1
Closes
#36 (closed)
Edited
Oct 5, 2017
by
slobinger
0
0
Merge request reports
Compare
master
version 1
ec2f3a60
Oct 5, 2017
master (base)
and
version 1
latest version
f617f6bb
2 commits,
Oct 5, 2017
version 1
ec2f3a60
1 commit,
Oct 5, 2017
1 file
+
11
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
sams_classes/sams_hub.py
+
12
−
13
View file @ f617f6bb
Edit in single-file editor
Open in Web IDE
Show full file
from
flask
import
Flask
,
request
,
session
from
.exceptions
import
(
ManifestDefaultLanguageMissing
,
DefaultLanguageDictMissing
,
AppNotExist
,
FunctionNotExists
)
import
sys
import
os
from
typing
import
Dict
,
List
from
importlib
import
import_module
#from .exceptions import HubDirNotExist, FunctionNotExists
#from importlib import import_module
from
flask
import
Flask
,
request
,
session
from
.sams_app
import
SAMSApp
from
.exceptions
import
FunctionNotExists
from
optparse
import
Values
import
sys
from
.exceptions
import
(
ManifestDefaultLanguageMissing
,
DefaultLanguageDictMissing
,
AppNotExist
,
FunctionNotExists
)
def
eprint
(
*
args
,
**
kwargs
):
print
(
*
args
,
file
=
sys
.
stderr
,
**
kwargs
)
@@ -28,7 +27,7 @@ class SAMSHub:
self
.
_appList
=
[]
self
.
_flaskApp
=
Flask
(
name
)
self
.
_flaskApp
.
context_processor
(
self
.
_context_processor
)
self
.
_flaskApp
.
secret_key
=
'
my awesome SAMSHub secret_key
'
self
.
_flaskApp
.
secret_key
=
os
.
urandom
(
24
)
def
addApp
(
self
,
app
:
SAMSApp
=
None
,
alias
=
None
):
if
not
isinstance
(
app
,
SAMSApp
):
Loading