If only one form is defined, go directly to that form from the index. Otherwise, show the list of defined forms.

pull/7/head
Ferry Boender 10 years ago
parent 3f4795d9ca
commit 02f5e128cc
  1. 5
      src/scriptform.py

@ -506,6 +506,11 @@ class ScriptFormWebApp(WebAppHandler):
This class is a request handler for WebSrv. This class is a request handler for WebSrv.
""" """
def index(self): def index(self):
form_config = self.scriptform.get_form_config()
if len(form_config.forms) == 1:
first_form = form_config.forms[0]
return self.h_form(first_form.name)
else:
return self.h_list() return self.h_list()
def auth(self): def auth(self):

Loading…
Cancel
Save