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
Commits
b8ba5670
Commit
b8ba5670
authored
May 17, 2017
by
Sebastian Lobinger
Browse files
Options
Downloads
Patches
Plain Diff
update sams_hub.py addApp + menu use _appList to pass test_main_app
parent
c0567961
No related branches found
No related tags found
1 merge request
!1
Resolve "Eine App sollte in SAMSHub als main bestimmt werden können und für URLs kein prefiy erhalten"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sams_classes/sams_hub.py
+3
-1
3 additions, 1 deletion
sams_classes/sams_hub.py
with
3 additions
and
1 deletion
sams_classes/sams_hub.py
+
3
−
1
View file @
b8ba5670
...
...
@@ -25,6 +25,7 @@ class SAMSHub:
raise
TypeError
(
'
Parameter config musst contain a value for
"
default_language
"'
)
self
.
_apps
=
{}
self
.
_appList
=
[]
self
.
_flaskApp
=
Flask
(
name
)
self
.
_flaskApp
.
context_processor
(
self
.
_context_processor
)
self
.
_flaskApp
.
secret_key
=
'
my awesome SAMSHub secret_key
'
...
...
@@ -33,6 +34,7 @@ class SAMSHub:
if
not
isinstance
(
app
,
SAMSApp
):
raise
TypeError
(
'
Argument app has to be a SAMSApp.
'
)
self
.
_apps
[
app
.
name
]
=
app
self
.
_appList
.
append
(
app
)
if
app
.
name
is
self
.
_config
.
get
(
'
main_app
'
):
self
.
_flaskApp
.
register_blueprint
(
app
.
blueprint
)
else
:
...
...
@@ -75,7 +77,7 @@ class SAMSHub:
def
menu
(
self
,
langCode
):
menu
=
[]
for
app
in
self
.
_app
s
.
values
()
:
for
app
in
self
.
_app
List
:
if
self
.
_config
.
get
(
'
main_app
'
)
is
app
.
name
:
menu
.
extend
(
app
.
menu
(
langCode
=
langCode
))
else
:
...
...
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