A tool that evaluates high-risk Wikipedia templates https://tools.wmflabs.org/earwig-dev/tif
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

23 rindas
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()