From 5d039d8340821c58b5e58cfefa0bf2b22f200900 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 15 Nov 2018 21:48:09 +0300 Subject: [PATCH] README: Update for changes in storing of form fields. --- README.rst | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 6a9c7c7..c50bd4e 100644 --- a/README.rst +++ b/README.rst @@ -69,7 +69,7 @@ Bottle and Django. Note that this does not mean particular "compatibility" with Flask, Bottle, or Django: most existing web frameworks are synchronous (and threaded), while picoweb is async framework, so its architecture is quite different. However, there is an aim to save porting efforts from -repeatitive search & replace trials: for example, when methods do similar +repetitive search & replace trials: for example, when methods do similar things, they are likely named the same (but they may take slightly different parameters, return different values, and behave slightly differently). @@ -96,12 +96,25 @@ provided). Last point is questionable conveniences. For example, both Flask and Bottle provide special objects to handle form/get parameters, with features like "if request variable has only one value, the value is returned directly; -otherwise, list of values is returned". However, Python standard library +otherwise, list of values is returned". + +.. raw:: html + + + +However, Python standard library provides function parse_qs(), which always returns array of values (based on the fact that any request variable may have more than one value). Given 2 choices, picoweb follows the interface of the standard library, instead of providing extra wrapper class on top of it. +.. raw:: html + + + +Changed in 1.5: now normal single-valued fields store the value directly, list is used only +for multi-valued fields. (Reasons: convenience, reduced memory usage.) + API reference -------------