def return_pdf(pdf_name): try: return redirect(url_for('static', filename=app.config['PDF_DIR'] + secure_filename(pdf_name))) except: abort(404)