Skip to content
Snippets Groups Projects
Commit ee5ca6d4 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

Revert "make use of alias feature #29 in ExampleApp"

This reverts commit f8b9a90d.
parent f8b9a90d
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -7,9 +7,7 @@ def create_hub():
hubConf = yaml.load(f.read())
hub = SAMSHub(name= __name__, config=hubConf['exampleApp'])
hub.flaskApp.config.update(hubConf.get('flask', {}))
for appEntry in hubConf['apps']:
appName = appEntry['name']
appAlias = appEntry.get('alias')
for appName in hubConf['apps']:
with open(appName.replace('.', '/') + '/manifest.yaml') as f:
manifest = yaml.load(f.read())
langDict = {'en': {}}
......@@ -18,9 +16,7 @@ def create_hub():
singleLang = yaml.load(f.read())
langDict.update(
{os.path.splitext(os.path.basename(yaml_file))[0]: singleLang})
hub.addApp(
SAMSApp(name = appName, manifest = manifest, langDict = langDict),
alias = appAlias)
hub.addApp(SAMSApp(name = appName, manifest = manifest, langDict = langDict))
return hub
def search_yaml_files(path, exts = ['.yaml', '.yml']):
......
......@@ -5,6 +5,5 @@ exampleApp:
default_language: de
main_app: 'ExampleApp.Main'
apps:
- name: 'ExampleApp.Main'
- name: 'ExampleApp.Extra'
alias: 'Extra'
\ No newline at end of file
- 'ExampleApp.Main'
- 'ExampleApp.Extra'
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment