A tool that evaluates high-risk Wikipedia templates https://tools.wmflabs.org/earwig-dev/tif
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

23 行
527 B

  1. #! /usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from flask import Flask
  4. from flask.ext.mako import MakoTemplates, render_template
  5. from tif.calc import calculate_tif
  6. from tif.util import catch_errors, set_up_hash_caching
  7. app = Flask(__name__)
  8. MakoTemplates(app)
  9. set_up_hash_caching(app)
  10. @app.route("/")
  11. @catch_errors(app)
  12. def index():
  13. title = request.args.get("title")
  14. result = calculate_tif(title) if title else None
  15. return render_template("index.mako", result=result)
  16. if __name__ == '__main__':
  17. app.run()