From fbf921e401e2bb72d3695106e3983a943f44049f Mon Sep 17 00:00:00 2001 From: Miguel BarĂ£o Date: Thu, 30 Mar 2017 16:41:37 +0100 Subject: [PATCH] - changed sessions to 'file' and added a 'sessions' folder to contain the session files. --- questions.py | 1 + serve.py | 2 +- sessions/.gitignore | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 sessions/.gitignore diff --git a/questions.py b/questions.py index 2470392..ad93ce8 100644 --- a/questions.py +++ b/questions.py @@ -461,6 +461,7 @@ class QuestionTextArea(Question): stdin=self['answer'], timeout=self['timeout'] ) + if type(out) in (int, float): self['grade'] = float(out) diff --git a/serve.py b/serve.py index e8565ab..ce8eca5 100755 --- a/serve.py +++ b/serve.py @@ -358,7 +358,7 @@ if __name__ == '__main__': '/': { 'tools.sessions.on': True, 'tools.sessions.timeout': 240, # sessions last 4 hours - 'tools.sessions.storage_type': 'ram', # or 'file' + 'tools.sessions.storage_type': 'file', # 'ram' or 'file' 'tools.sessions.storage_path': 'sessions', # if storage_type='file' # tools.sessions.secure = True # tools.sessions.httponly = True diff --git a/sessions/.gitignore b/sessions/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/sessions/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore -- libgit2 0.21.2