A tool that evaluates high-risk Wikipedia templates https://tools.wmflabs.org/earwig-dev/tif
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

12345678910111213141516171819202122232425262728
  1. #! /usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from flask import Flask, g
  4. from flask.ext.mako import MakoTemplates, render_template
  5. from tif.util import catch_errors, set_up_hash_caching
  6. app = Flask(__name__)
  7. MakoTemplates(app)
  8. set_up_hash_caching(app)
  9. @app.before_request
  10. def prepare_request():
  11. g._db = None
  12. @app.teardown_appcontext
  13. def close_databases(error):
  14. if g._db:
  15. g._db.close()
  16. @app.route("/")
  17. @catch_errors(app)
  18. def index():
  19. return render_template("index.mako")
  20. if __name__ == '__main__':
  21. app.run()