diff --git a/applications/examples/static/css/stupid.css b/applications/examples/static/css/stupid.css index 08f42938..80bf9b09 100644 --- a/applications/examples/static/css/stupid.css +++ b/applications/examples/static/css/stupid.css @@ -312,8 +312,8 @@ a:not(.btn):not(.noeffect):after { /*** accordion ***/ .accordion>label{cursor:pointer} -.accordion>input ~ label:before {content:"▲ "; color:#ddd} -.accordion>input:checked ~ label:before {content:"▼ "; color:#ddd} +.accordion>input ~ label:before {content:"\25b2"; color:#ddd} +.accordion>input:checked ~ label:before {content:"\25bc"; color:#ddd} .accordion>input {display:none} .accordion>input:checked ~ *:not(label) { max-height: 1000px !important; diff --git a/gluon/packages/dal b/gluon/packages/dal index 77e0d3f3..79ec4e99 160000 --- a/gluon/packages/dal +++ b/gluon/packages/dal @@ -1 +1 @@ -Subproject commit 77e0d3f386e326a2016a7e2139900ce72d7ddada +Subproject commit 79ec4e99d09b768ca2dcc42ac32f408529e0745f diff --git a/gluon/streamer.py b/gluon/streamer.py index dd7b78b2..cfedb264 100644 --- a/gluon/streamer.py +++ b/gluon/streamer.py @@ -25,22 +25,25 @@ regex_stop_range = re.compile('(?<=\-)\d+') DEFAULT_CHUNK_SIZE = 64 * 1024 -def streamer(stream, chunk_size=DEFAULT_CHUNK_SIZE, bytes=None): - offset = 0 - while bytes is None or offset < bytes: - if not bytes is None and bytes - offset < chunk_size: - chunk_size = bytes - offset - data = stream.read(chunk_size) - length = len(data) - if not length: - break - else: - yield data - if length < chunk_size: - break - offset += length - stream.close() - +def streamer(stream, chunk_size=DEFAULT_CHUNK_SIZE, bytes=None, callback=None): + try: + offset = 0 + while bytes is None or offset < bytes: + if not bytes is None and bytes - offset < chunk_size: + chunk_size = bytes - offset + data = stream.read(chunk_size) + length = len(data) + if not length: + break + else: + yield data + if length < chunk_size: + break + offset += length + finally: + stream.close() + if callback: + callback() def stream_file_or_304_or_206( static_file, diff --git a/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh b/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh index 883aec81..4755081b 100644 --- a/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh +++ b/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh @@ -214,18 +214,18 @@ then fi /etc/init.d/nginx start -start uwsgi-emperor +systemctl start emperor.uwsgi.service echo <