Browse Source

Bugfixes -- Flask's documentation is broken regarding this.

pull/24/head
Ben Kurtovic 9 years ago
parent
commit
0e2292eba0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app.py

+ 2
- 2
app.py View File

@@ -80,7 +80,7 @@ def close_databases(error):
if g._db: if g._db:
g._db.close() g._db.close()


def external_url_handler(error, endpoint, **values):
def external_url_handler(error, endpoint, values):
if endpoint == "static" and "file" in values: if endpoint == "static" and "file" in values:
fpath = path.join(app.static_folder, values["file"]) fpath = path.join(app.static_folder, values["file"])
mtime = path.getmtime(fpath) mtime = path.getmtime(fpath)
@@ -94,7 +94,7 @@ def external_url_handler(error, endpoint, **values):
return "/static/{0}?v={1}".format(values["file"], hashstr) return "/static/{0}?v={1}".format(values["file"], hashstr)
raise error raise error


app.build_error_handler = external_url_handler
app.url_build_error_handlers.append(external_url_handler)


@app.route("/") @app.route("/")
@catch_errors @catch_errors


Loading…
Cancel
Save