Flask

'''Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions. And before you ask: It's BSD licensed! Flask runs on Dreamhost via Passenger WSGI.'''

= Quickstart =
 * 1) Set up an environment using virtualenv
 * 2) * virtualenv-1.5.2/virtualenv.py --no-site-packages --distribute $HOME/flask_env
 * 3) Activate it and install Flask
 * 4) * cd flask_env
 * 5) * source bin/activate
 * 6) * easy_install pip
 * 7) * pip install Flask
 * 8) Use the Dreamhost Control Panel to create a Passenger WSGI domain inside of your virtualenv
 * 9) * Web directory: /home/username/flask_env/public
 * 10) * Passenger (Ruby/Python apps only): Yes!
 * 11) Put your Flask site inside of the virtualenv, but not inside of the public dir
 * 12) * cd $HOME/flask_env
 * 13) * mkdir mysite
 * 14) Put a passenger_wsgi.py file inside of the virtualenv.

= Example passenger_wsgi.py =

import sys, os INTERP = os.path.join(os.environ['HOME'], 'flask_env', 'bin', 'python') if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv) sys.path.append(os.getcwd) from mysite import app as application
 * 1) Uncomment next two lines to enable debugging
 * 2) from werkzeug.debug import DebuggedApplication
 * 3) application = DebuggedApplication(application, evalex=True)

= Refresh After Changes = To force a refresh of your site after making changes, touch restart.txt:
 * cd $HOME/flask_env
 * mkdir tmp
 * touch tmp/restart.txt