Mercurial > piecrust2
diff piecrust/wsgiutil/cwdadminapp.py @ 897:b4156f5d4368
wsgi: Add admin panel to WSGI helpers.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 08 Jul 2017 22:01:00 -0700 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/piecrust/wsgiutil/cwdadminapp.py Sat Jul 08 22:01:00 2017 -0700 @@ -0,0 +1,13 @@ +# This is a utility module that can be used with any WSGI-compatible server +# like Werkzeug or Gunicorn. It returns a WSGI app for serving a PieCrust +# administration panel located in the current working directory. +import os +from piecrust.wsgiutil import get_admin_app + + +root_dir = os.getcwd() +app = get_admin_app(root_dir) +# Add this for `mod_wsgi`. +application = app + +