diff --git a/applications/examples/private/content/en/default/what/whyweb2py.markmin b/applications/examples/private/content/en/default/what/whyweb2py.markmin index e4337a59..358a81c0 100644 --- a/applications/examples/private/content/en/default/what/whyweb2py.markmin +++ b/applications/examples/private/content/en/default/what/whyweb2py.markmin @@ -3,9 +3,9 @@ - **Created by a community of professionals** and University professors in Computer Science and Software Engineering. - **Always backward compatible.** We have not broken backward compatibility since version 1.0 in 2007, and we pledge not to break it in the future. - **Easy to run.** It requires no installation and no configuration. -- **Runs on** Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web hosting via Python 2.5/2.6/2.7/pypy, or Java with Jython. -- **Runs with** Apache, Lighttpd, Cherokee and almost any other web server via CGI, FastCGI, WSGI, mod_proxy, and/or mod_python. It can embed third party WSGI apps and middleware. -- **Talks to** SQLite, PostgreSQL, MySQL, MSSQL, FireBird, Oracle, IBM DB2, Informix, Ingres, and Google App Engine. +- **Runs on** Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web hosting via Python 2.7/3.5/3.6/pypy. +- **Runs with** Apache, Nginx, Lighttpd, Cherokee and almost any other web server via CGI, FastCGI, WSGI, mod_proxy, and/or mod_python. It can embed third party WSGI apps and middleware. +- **Talks to** SQLite, PostgreSQL, MySQL, MSSQL, FireBird, Sybase, Oracle, IBM DB2, Informix, Ingres, MongoDB, and Google App Engine. - **Secure** [[It prevents the most common types of vulnerabilities http://web2py.com/examples/default/security]] including Cross Site Scripting, Injection Flaws, and Malicious File Execution. - **Enforces good Software Engineering practices** (Model-View-Controller design, Server-side form validation, postbacks) that make the code more readable, scalable, and maintainable. - **Speaks multiple protocols** HTML/XML, RSS/ATOM, RTF, PDF, JSON, AJAX, XML-RPC, CSV, REST, WIKI, Flash/AMF, and Linked Data (RDF). diff --git a/gluon/globals.py b/gluon/globals.py index cb52d331..b4344f0f 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -220,7 +220,12 @@ class Request(Storage): if is_json: try: - json_vars = json_parser.load(body) + # In Python 3 versions prior to 3.6 load doesn't accept bytes and + # bytearray, so we read the body convert to native and use loads + # instead of load. + # This line can be simplified to json_vars = json_parser.load(body) + # if and when we drop support for python versions under 3.6 + json_vars = json_parser.loads(to_native(body.read())) except: # incoherent request bodies can still be parsed "ad-hoc" json_vars = {} diff --git a/gluon/tools.py b/gluon/tools.py index b063b6ea..fad0ef33 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -3778,9 +3778,9 @@ class Auth(AuthAPI): if any(f.compute for f in extra_fields): user = table_user[self.user.id] self._update_session_user(user) + self.update_groups() else: self.user.update(table_user._filter_fields(form.vars)) - session.flash = self.messages.profile_updated self.log_event(log, self.user) callback(onaccept, form)