Bläddra i källkod

Call copyvios.globalize() before requests.

pull/24/head
Ben Kurtovic 10 år sedan
förälder
incheckning
8b0c0aa38f
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. +2
    -0
      app.fcgi

+ 2
- 0
app.fcgi Visa fil

@@ -8,6 +8,7 @@ from time import asctime
from traceback import format_exc from traceback import format_exc


from earwigbot.bot import Bot from earwigbot.bot import Bot
from earwigbot.wiki.copyvios import globalize
from flask import Flask, g, request from flask import Flask, g, request
from flask.ext.mako import MakoTemplates, render_template, TemplateError from flask.ext.mako import MakoTemplates, render_template, TemplateError
from flup.server.fcgi import WSGIServer from flup.server.fcgi import WSGIServer
@@ -40,6 +41,7 @@ def catch_errors(func):


@app.before_request @app.before_request
def prepare_request(): def prepare_request():
globalize()
g.bot = bot g.bot = bot
g.globals_db = g.cache_db = None g.globals_db = g.cache_db = None
g.cookies = parse_cookies(request.script_root, g.cookies = parse_cookies(request.script_root,


Laddar…
Avbryt
Spara