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(): ...@@ -7,9 +7,7 @@ def create_hub():
hubConf = yaml.load(f.read()) hubConf = yaml.load(f.read())
hub = SAMSHub(name= __name__, config=hubConf['exampleApp']) hub = SAMSHub(name= __name__, config=hubConf['exampleApp'])
hub.flaskApp.config.update(hubConf.get('flask', {})) hub.flaskApp.config.update(hubConf.get('flask', {}))
for appEntry in hubConf['apps']: for appName in hubConf['apps']:
appName = appEntry['name']
appAlias = appEntry.get('alias')
with open(appName.replace('.', '/') + '/manifest.yaml') as f: with open(appName.replace('.', '/') + '/manifest.yaml') as f:
manifest = yaml.load(f.read()) manifest = yaml.load(f.read())
langDict = {'en': {}} langDict = {'en': {}}
...@@ -18,9 +16,7 @@ def create_hub(): ...@@ -18,9 +16,7 @@ def create_hub():
singleLang = yaml.load(f.read()) singleLang = yaml.load(f.read())
langDict.update( langDict.update(
{os.path.splitext(os.path.basename(yaml_file))[0]: singleLang}) {os.path.splitext(os.path.basename(yaml_file))[0]: singleLang})
hub.addApp( hub.addApp(SAMSApp(name = appName, manifest = manifest, langDict = langDict))
SAMSApp(name = appName, manifest = manifest, langDict = langDict),
alias = appAlias)
return hub return hub
def search_yaml_files(path, exts = ['.yaml', '.yml']): def search_yaml_files(path, exts = ['.yaml', '.yml']):
......
...@@ -5,6 +5,5 @@ exampleApp: ...@@ -5,6 +5,5 @@ exampleApp:
default_language: de default_language: de
main_app: 'ExampleApp.Main' main_app: 'ExampleApp.Main'
apps: apps:
- name: 'ExampleApp.Main' - 'ExampleApp.Main'
- name: 'ExampleApp.Extra' - 'ExampleApp.Extra'
alias: 'Extra' \ No newline at end of file
\ 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