Mercurial > templog
diff web/templog.py @ 283:788d713f6b87
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 30 Nov 2015 21:45:17 +0800 |
parents | 0a1c02160e66 6c14e0573f50 |
children | 8441916e3095 |
line wrap: on
line diff
--- a/web/templog.py Mon Nov 30 21:40:57 2015 +0800 +++ b/web/templog.py Mon Nov 30 21:45:17 2015 +0800 @@ -94,8 +94,13 @@ def set(): allowed = ["false", "true"][secure.check_user_hash(config.ALLOWED_USERS)] response.set_header('Cache-Control', 'no-cache') + inline_data = log.get_params() + if not inline_data: + response.status = 503 # Service Unavailable + return bottle.template('noparamsyet') + return bottle.template('set', - inline_data = log.get_params(), + inline_data = inline_data, csrf_blob = secure.get_csrf_blob(), allowed = allowed)