def index(): Religion = Blog.query.filter_by(category="Religion").all() Politics = Blog.query.filter_by(category="Politics").all() Love = Blog.query.filter_by(category="Love").all() Cancer = Blog.query.filter_by(category="Cancer").all() Science = Blog.query.filter_by(category="Science").all() quotes = get_quote() blogs = Blog.query.filter().all() return render_template('index.html', Religion=Religion, Politics=Politics, Love=Love, Cancer=Cancer, Science=Science, blog=blog, quotes=quotes)
def quote(): quote = requests.get_quote() return render_template('quote.html', quote=quote)
def about(): quote = requests.get_quote() return render_template('quote.html', title='About', quote=quote)
def home(): quote = requests.get_quote() posts = Post.query.all() return render_template('home.html', posts=posts, quote=quote)
def home(): title= 'Home - Pitch APP ' quote = requests.get_quote() return render_template('index.html',title=title, quote=quote)
def index(): blogs = Blog.query.all() quote = get_quote() title = "welcome" return render_template("index.html", title=title, blogs=blogs, quote=quote)
def home(): page = request.args.get('page', 1, type=int) posts = Post.query.order_by(Post.date_posted.desc()).paginate(page=page, per_page=5) quote = requests.get_quote() return render_template('home.html', posts=posts, quote=quote)