Commit 24e7b57e authored by Nicholas J Anderson's avatar Nicholas J Anderson

Implemented Frozen-Flask

Run `python srctweb.py build` and a static file version of the website
will be dumped to `projectroot/srctweb/website/build`.
parent a4e4afba
*.sw*
*.pyc
*~
srctweb/website/build
......@@ -7,3 +7,4 @@ argparse==1.2.1
gunicorn==18.0
itsdangerous==0.23
wsgiref==0.1.2
Frozen-Flask==0.11
#!flask/bin/python
import sys
from website import website
from website import freezer
if __name__ == '__main__': ## This is for debugging use only.
if len(sys.argv) > 1 and sys.argv[1] == "build":
freezer.freeze()
website.run(debug=True)
## This is for execution via gunicorn.
......
from flask import Flask
from flask.ext.gravatar import Gravatar
from flask_frozen import Freezer
website = Flask(__name__)
freezer = Freezer(website)
from website import views
# initialize gravatar defaults
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment