(password)
| 1569 | thread.start() |
| 1570 | |
| 1571 | def install_auth_handler(password): |
| 1572 | app.config['PASSWORD'] = password |
| 1573 | |
| 1574 | @app.before_request |
| 1575 | def check_password(): |
| 1576 | if not session.get('authorized') and request.path != '/login/' and \ |
| 1577 | not request.path.startswith(('/static/', '/favicon')): |
| 1578 | flash('You must log-in to view the database browser.', 'danger') |
| 1579 | session['next_url'] = request.base_url |
| 1580 | return redirect(url_for('login')) |
| 1581 | |
| 1582 | def initialize_dataset(filename): |
| 1583 | dataset_kw = {} |