Skip to content
Snippets Groups Projects
Commit 6eb54c67 authored by Harry Hughes's avatar Harry Hughes
Browse files

Replace routes.py

parent 940479fe
No related branches found
No related tags found
No related merge requests found
from flask import render_template, url_for, request, redirect, flash, Response, send_file, abort
from blog import app, db
import os
from blog.models import User, Post, Portfolio
from blog.forms import RegistrationForm, LoginForm, UpdateAccountForm, PostForm
from flask_login import login_user, logout_user, current_user
......@@ -24,8 +25,8 @@ def cv():
@app.route('/download')
def download():
path = "static/pdf/cv.pdf"
return send_file(path, as_attachment=True)
file_path = os.path.join(os.getcwd(), "blog", "static", "pdf", "cv.pdf")
return send_file(file_path, as_attachment=True)
@app.route("/blog")
def blog():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment