示例#1
0
def index():
    title = 'COVID Coach'
    listOf2 = get_stats_list()
    world_dict = listOf2[0]
    usa_dict = listOf2[1]
    return render_template('index.html',
                           world=world_dict,
                           usa=usa_dict,
                           title=title)
示例#2
0
def initDB_page():
    a = initDB()
    a.run()
    title = 'COVID Coach'
    listOf2 = get_stats_list()
    world_dict = listOf2[0]
    usa_dict = listOf2[1]
    return render_template('index.html',
                           world=world_dict,
                           usa=usa_dict,
                           title=title)
示例#3
0
def save_post():
    post = models.Post_DM(title=request.form['title'],
                          body=request.form['content'],
                          user_id=current_user.id,
                          timestamp=time.time())
    db.session.add(post)
    db.session.commit()
    flash('Your message already issued successfully~')
    title = 'COVID Coach'
    listOf2 = get_stats_list()
    world_dict = listOf2[0]
    usa_dict = listOf2[1]
    return redirect(
        url_for('index', world=world_dict, usa=usa_dict, title=title))