Browse Source

Attempt to pass arguments correctly.

pull/24/head
Ben Kurtovic 10 years ago
parent
commit
39f3f900e2
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      app.fcgi

+ 8
- 3
app.fcgi View File

@@ -9,6 +9,8 @@ from flask import Flask, request
from flask.ext.mako import MakoTemplates, render_template from flask.ext.mako import MakoTemplates, render_template
from flup.server.fcgi import WSGIServer from flup.server.fcgi import WSGIServer


from copyvios.cookies import parse_cookies

app = Flask(__name__) app = Flask(__name__)
MakoTemplates(app) MakoTemplates(app)


@@ -25,15 +27,18 @@ def write_access_log(response):


@app.route("/") @app.route("/")
def index(): def index():
return render_template("index.mako")
cookies = parse_cookies(request.environ)
return render_template("index.mako", environ=request.environ, cookies=cookies)


@app.route("/settings") @app.route("/settings")
def settings(): def settings():
return render_template("settings.mako")
cookies = parse_cookies(request.environ)
return render_template("settings.mako", environ=request.environ, cookies=cookies)


@app.route("/debug") @app.route("/debug")
def debug(): def debug():
return render_template("debug.mako")
cookies = parse_cookies(request.environ)
return render_template("debug.mako", environ=request.environ, cookies=cookies)


if __name__ == '__main__': if __name__ == '__main__':
WSGIServer(app).run() WSGIServer(app).run()

Loading…
Cancel
Save