当前位置: 首页>>代码示例>>Python>>正文


Python Question.get_page_question方法代码示例

本文整理汇总了Python中models.Question.get_page_question方法的典型用法代码示例。如果您正苦于以下问题:Python Question.get_page_question方法的具体用法?Python Question.get_page_question怎么用?Python Question.get_page_question使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在models.Question的用法示例。


在下文中一共展示了Question.get_page_question方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: store_question

# 需要导入模块: from models import Question [as 别名]
# 或者: from models.Question import get_page_question [as 别名]
def store_question(store_id):
    db = g._imdb

    offset = int(request.args.get('offset', 0))
    limit = int(request.args.get('limit', 10))

    rows_found = Question.get_question_count(db, store_id)
    sellers = Question.get_page_question(db, store_id, offset, limit)
    store_info = Store.get_store(db, store_id)

    g.pagination.setdefault()
    g.pagination.rows_found = rows_found
    g.pagination.limit = limit
    g.pagination.offset = offset

    return render_template('store/question.html',
                           data={'offset': offset,
                                 'list': sellers,
                                 'store_info': store_info,
                                 'pagination': g.pagination,
                                 })
开发者ID:jzxyouok,项目名称:kefu_web,代码行数:23,代码来源:store.py

示例2: question_index

# 需要导入模块: from models import Question [as 别名]
# 或者: from models.Question import get_page_question [as 别名]
def question_index():
    db = g._imdb

    uid = session['user']['id']
    store_id = session['user']['store_id']

    offset = int(request.args.get('offset', 0))
    limit = int(request.args.get('limit', 10))

    rows_found = Question.get_question_count(db, store_id)
    questions = Question.get_page_question(db, store_id, offset, limit)

    g.pagination.setdefault()
    g.pagination.rows_found = rows_found
    g.pagination.limit = limit
    g.pagination.offset = offset

    return render_template('question/question.html',
                           data={'offset': offset,
                                 'list': questions,
                                 'pagination': g.pagination,
                                 })
开发者ID:richmonkey,项目名称:xiaowei_web,代码行数:24,代码来源:question.py


注:本文中的models.Question.get_page_question方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。