Mercurial > piecrust2
diff piecrust/wsgiutil/cwdapp.py @ 379:d40b744a9d99
serve: Add a generic WSGI app factory.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 09 May 2015 08:48:58 -0700 |
parents | fe8a58817088 |
children |
line wrap: on
line diff
--- a/piecrust/wsgiutil/cwdapp.py Sat May 09 08:37:32 2015 -0700 +++ b/piecrust/wsgiutil/cwdapp.py Sat May 09 08:48:58 2015 -0700 @@ -2,12 +2,11 @@ # like Werkzeug or Gunicorn. It returns a WSGI app for serving a PieCrust # website located in the current working directory. import os -from piecrust.serving.server import Server +from piecrust.wsgiutil import get_app root_dir = os.getcwd() -server = Server(root_dir, sub_cache_dir='prod', enable_debug_info=False) -app = server.getWsgiApp() +app = get_app(root_dir) # Add this for `mod_wsgi`. application = app