A tool that evaluates high-risk Wikipedia templates https://tools.wmflabs.org/earwig-dev/tif
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

29 lines
540 B

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