app.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:Commodity-analysis 作者: buhuipao 项目源码 文件源码
def index():
    form = SearchForm()
    if form.validate_on_submit():
        old_word = session.get('key_word')
        old_price = session.get('price')
        if old_word == form.key_word.data and \
           old_price == form.price.data:
            flash('It seems like you searched the same keyword and \
                    price for the two time!')
        session['price'] = form.price.data
        session['key_word'] = form.key_word.data
        return redirect(url_for('search',
                        key_word=form.key_word.data,
                        price=form.price.data, refresh=form.refresh.data))

    return render_template('index.html', form=form)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号