- if os.path.basename(sys.argv[0]).startswith('auth'):
- root = InvirtWeb()
- elif os.path.basename(sys.argv[0]).startswith('unauth'):
- root = InvirtUnauthWeb()
+ if mode.startswith('auth'):
+ root = main.InvirtWeb()
+ app_config['/']['tools.mako.module_directory'] = "/tmp/invirt-auth-web-templatecache"
+ elif mode.startswith('unauth'):
+ root = main.InvirtUnauthWeb()
+ app_config['/']['tools.mako.module_directory'] = "/tmp/invirt-unauth-web-templatecache"