config: Fix Ikiwiki entries not showing up as default apps

- When a user selects their Ikiwiki wiki or blog as the default app, the UI
  doesn't reflect that. It still shows Plinth as the default app. This commit
  fixes the bug.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2019-02-15 16:23:22 +05:30 committed by James Valleroy
parent 5ad22114ed
commit 209d8e7b3a
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -74,14 +74,13 @@ def get_default_app():
if aug.get(match + "/arg[1]") == '''"^/$"''':
app_path = aug.get(match + "/arg[2]")
return app_path.strip('/"')
return app_path.strip('/"').replace('/', '_')
def init():
"""Initialize the module"""
menu = main_menu.get('system')
menu.add_urlname(
ugettext_lazy('Configure'), 'fa-cog', 'config:index')
menu.add_urlname(ugettext_lazy('Configure'), 'fa-cog', 'config:index')
# Register domain with Name Services module.
domainname = get_domainname()