Created
February 18, 2013 03:10
-
-
Save crackcell/4974902 to your computer and use it in GitHub Desktop.
BAE(Baidu App Engine) static files config for python and flask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handlers: | |
- url: /static/(.*) | |
static_files: templates/static/$1 | |
- url : /.* | |
script: app.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf-8; indent-tabs-mode: nil -*- | |
# | |
# Copyright 2013 Menglong TAN <[email protected]> | |
# | |
import os | |
from flask import Flask, g, request, config, session, render_template | |
# set static file path | |
app = Flask(__name__, | |
static_folder=os.path.join(os.path.dirname(__file__), | |
"templates/static")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment