-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
To use SmxWsgi: | ||
## SmxWsgi module | ||
|
||
Simplest way to use the SmxWsgi module: | ||
|
||
``` | ||
SMX_INIT=/path/to/my/config.file SMX_ROOT=/path/to/my/html/ gunicorn -w 4 smx:SmxWsgi | ||
``` | ||
|
||
* This will serve up files named "index.smx" as directory listings. | ||
* The following macros are availale: | ||
* All cgi env vars are availalbe in %environ() | ||
* %form(x) returns form input data, or query string | ||
* %jq% contains the json posted dict | ||
|
||
* %jq(x) contains the json posted dict | ||
* %redirect(url) will redirect | ||
* %redirect(url, 301) will redirect301 | ||
* %error(500, msg, body) will throw an error | ||
|
||
All smx macros and python are otherwise available. | ||
|
||
.smx pages are always parsed | ||
.html pages can optionally contain embedded smx, trigger with %expand% at the top of the page. |