Mercurial > piecrust2
annotate piecrust/wsgiutil/__init__.py @ 621:8f9c0bdb3724
publish: Polish/refactor the publishing workflows.
* Add a `--preview` option.
* The `--list` option gives a nicer output, and prints warnings/errors for
incorrect configuration.
* Moved most of the `shell` code into a base class that's reusable.
* Simplified the code to log publishing to a file.
* Nicer output overall, with times.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 08 Feb 2016 20:44:26 -0800 |
parents | cc6f3dbe3048 |
children | 81d9c3a3a0b5 |
rev | line source |
---|---|
553
cc6f3dbe3048
serve: Extract some of the server's functionality into WSGI middlewares.
Ludovic Chabant <ludovic@chabant.com>
parents:
379
diff
changeset
|
1 from piecrust.serving.server import WsgiServer |
379
d40b744a9d99
serve: Add a generic WSGI app factory.
Ludovic Chabant <ludovic@chabant.com>
parents:
376
diff
changeset
|
2 |
d40b744a9d99
serve: Add a generic WSGI app factory.
Ludovic Chabant <ludovic@chabant.com>
parents:
376
diff
changeset
|
3 |
d40b744a9d99
serve: Add a generic WSGI app factory.
Ludovic Chabant <ludovic@chabant.com>
parents:
376
diff
changeset
|
4 def get_app(root_dir, sub_cache_dir='prod', enable_debug_info=False): |
553
cc6f3dbe3048
serve: Extract some of the server's functionality into WSGI middlewares.
Ludovic Chabant <ludovic@chabant.com>
parents:
379
diff
changeset
|
5 app = WsgiServer(root_dir, |
cc6f3dbe3048
serve: Extract some of the server's functionality into WSGI middlewares.
Ludovic Chabant <ludovic@chabant.com>
parents:
379
diff
changeset
|
6 sub_cache_dir=sub_cache_dir, |
cc6f3dbe3048
serve: Extract some of the server's functionality into WSGI middlewares.
Ludovic Chabant <ludovic@chabant.com>
parents:
379
diff
changeset
|
7 enable_debug_info=enable_debug_info) |
379
d40b744a9d99
serve: Add a generic WSGI app factory.
Ludovic Chabant <ludovic@chabant.com>
parents:
376
diff
changeset
|
8 return app |
d40b744a9d99
serve: Add a generic WSGI app factory.
Ludovic Chabant <ludovic@chabant.com>
parents:
376
diff
changeset
|
9 |