main_error_404.py 264 B

123456789
  1. from .tool.func import *
  2. def main_error_404_2(conn):
  3. curs = conn.cursor()
  4. if os.path.exists('404.html') and flask.request.path != '/':
  5. return open('404.html', encoding='utf8').read()
  6. else:
  7. return redirect('/w/' + url_pas(wiki_set(2)))