def maintenance_check(): if not cfg.MAINTENANCE_MODE: return None allowed_prefixes = ['/about', '/static', '/auth'] for prefix in allowed_prefixes: if request.path.startswith(prefix): return None if is_admin(): return None if request.path != url_for('frontend.maintenance'): return redirect(url_for('frontend.maintenance'))
def maintenance_check(): if not cfg.MAINTENANCE_MODE: return allowed_prefixes = ["/about", "/static", "/auth"] for prefix in allowed_prefixes: if request.path.startswith(prefix): return if is_admin(): return if request.path != url_for("maintenance"): return redirect(url_for("maintenance"))