list_please.py 990 B

1234567891011121314151617181920212223242526
  1. from .tool.func import *
  2. async def list_please(arg_num = 1):
  3. with get_db_connect() as conn:
  4. curs = conn.cursor()
  5. sql_num = (arg_num * 50 - 50) if arg_num * 50 > 0 else 0
  6. div = '<ul>'
  7. curs.execute(db_change("select distinct title from back where type = 'no' limit ?, 50"), [sql_num])
  8. data_list = curs.fetchall()
  9. for data in data_list:
  10. div += '' + \
  11. '<li>' + \
  12. '<a class="opennamu_not_exist_link" href="/w/' + url_pas(data[0]) + '">' + html.escape(data[0]) + '</a> ' + \
  13. '</li>' + \
  14. ''
  15. div += '</ul>' + await get_next_page_bottom('/list/document/need/{}', arg_num, data_list)
  16. return easy_minify(flask.render_template(await skin_check(),
  17. imp = [await get_lang('need_document'), await wiki_set(), await wiki_custom(conn), wiki_css([0, 0])],
  18. data = div,
  19. menu = [['other', await get_lang('return')]]
  20. ))