Exemple #1
0
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)
Exemple #2
0
def quote():
    quote = requests.get_quote()
    return render_template('quote.html', quote=quote)
Exemple #3
0
def about():
    quote = requests.get_quote()
    return render_template('quote.html', title='About', quote=quote)
Exemple #4
0
def home():
    quote = requests.get_quote()
    posts = Post.query.all()
    return render_template('home.html', posts=posts, quote=quote)
Exemple #5
0
def home():
    title= 'Home - Pitch APP '
    quote = requests.get_quote()
    return render_template('index.html',title=title, quote=quote)
Exemple #6
0
def index():
    blogs = Blog.query.all()
    quote = get_quote()
    title = "welcome"
    return render_template("index.html", title=title, blogs=blogs, quote=quote)
Exemple #7
0
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)