Update docs for mod_wsgi
@@ -99,27 +99,44 @@ To execute Isso, use a command similar to:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
First, create a startup script, called `isso.wsgi`. If Isso is in your system module
-search path, then the script is quite simple:
+search path, then the script is quite simple. This script is included in the
+isso distribution as `run.py`:
.. code-block:: python
+ from __future__ import unicode_literals
+
+ import os
+
from isso import make_app
- from isso.core import Config
+ from isso import dist, config
- application = make_app(Config.load("/path/to/isso.cfg"))
+ application = make_app(
+ config.load(
+ os.path.join(dist.location, dist.project_name, "defaults.ini"),
+ "/path/to/isso.cfg"),
+ multiprocessing=True)
If you have installed Isso in a virtual environment, then you will have to add the path
of the virtualenv to the site-specific paths of Python:
.. code-block:: python
+ from __future__ import unicode_literals
+
import site
site.addsitedir("/path/to/isso_virtualenv")
+ import os
+
from isso import make_app
- from isso.core import Config
+ from isso import dist, config
- application = make_app(Config.load("/path/to/isso.cfg"))
+ application = make_app(
+ config.load(
+ os.path.join(dist.location, dist.project_name, "defaults.ini"),
+ "/path/to/isso.cfg",
+ multiprocessing=True)
Using the aforementioned script will load system modules when available and modules
from the virtualenv otherwise. Should you want the opposite behavior, where modules from
@@ -127,6 +144,9 @@ the virtualenv have priority over system modules, the following script does the
.. code-block:: python
+ from __future__ import unicode_literals
+
+ import os
import site
import sys
@@ -145,9 +165,13 @@ the virtualenv have priority over system modules, the following script does the
sys.path[:0] = new_sys_path
from isso import make_app
- from isso.core import Config
+ from isso import dist, config
- application = make_app(Config.load("/path/to/isso.cfg"))
+ application = make_app(
+ config.load(
+ os.path.join(dist.location, dist.project_name, "defaults.ini"),
+ "/path/to/isso.cfg",
+ multiprocessing=True)
The last two scripts are based on those given by
`mod_wsgi documentation <https://code.google.com/p/modwsgi/wiki/VirtualEnvironments>`_.
