diff options
| author | Steve Piercy <web@stevepiercy.com> | 2018-08-18 12:29:36 -0700 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2018-08-18 12:29:36 -0700 |
| commit | 7334522930c3846fda0b75e70d69b22b90d491a0 (patch) | |
| tree | 8b4f5a13335f48d19afa1ff265c6da3c0880345b /docs/tutorials/modwsgi/index.rst | |
| parent | 5caadd304237a66961bddc7d7c641b1407fea6bf (diff) | |
| download | pyramid-7334522930c3846fda0b75e70d69b22b90d491a0.tar.gz pyramid-7334522930c3846fda0b75e70d69b22b90d491a0.tar.bz2 pyramid-7334522930c3846fda0b75e70d69b22b90d491a0.zip | |
Clean up code-blocks in modwsgi
Diffstat (limited to 'docs/tutorials/modwsgi/index.rst')
| -rw-r--r-- | docs/tutorials/modwsgi/index.rst | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/docs/tutorials/modwsgi/index.rst b/docs/tutorials/modwsgi/index.rst index a409284cc..66397fddf 100644 --- a/docs/tutorials/modwsgi/index.rst +++ b/docs/tutorials/modwsgi/index.rst @@ -38,8 +38,8 @@ specific path information for commands and files. .. code-block:: bash - $ cd ~ - $ cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + cd ~ + cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master If prompted for the first item, accept the default ``yes`` by hitting return. @@ -63,24 +63,24 @@ specific path information for commands and files. .. code-block:: bash - $ cd myproject - $ python3 -m venv env + cd myproject + python3 -m venv env #. Install your :app:`Pyramid` application and its dependencies. .. code-block:: bash - $ env/bin/pip install -e . + env/bin/pip install -e . #. Within the project directory (``~/myproject``), create a script named ``pyramid.wsgi``. Give it these contents: .. code-block:: python - from pyramid.paster import get_app, setup_logging - ini_path = '/Users/chrism/myproject/production.ini' - setup_logging(ini_path) - application = get_app(ini_path, 'main') + from pyramid.paster import get_app, setup_logging + ini_path = '/Users/chrism/myproject/production.ini' + setup_logging(ini_path) + application = get_app(ini_path, 'main') The first argument to :func:`pyramid.paster.get_app` is the project configuration file name. It's best to use the ``production.ini`` file @@ -106,25 +106,25 @@ specific path information for commands and files. .. code-block:: apache - # Use only 1 Python sub-interpreter. Multiple sub-interpreters - # play badly with C extensions. See - # http://stackoverflow.com/a/10558360/209039 - WSGIApplicationGroup %{GLOBAL} - WSGIPassAuthorization On - WSGIDaemonProcess pyramid user=chrism group=staff threads=4 \ + # Use only 1 Python sub-interpreter. Multiple sub-interpreters + # play badly with C extensions. See + # http://stackoverflow.com/a/10558360/209039 + WSGIApplicationGroup %{GLOBAL} + WSGIPassAuthorization On + WSGIDaemonProcess pyramid user=chrism group=staff threads=4 \ python-path=/Users/chrism/myproject/env/lib/python3.5/site-packages - WSGIScriptAlias /myapp /Users/chrism/myproject/pyramid.wsgi + WSGIScriptAlias /myapp /Users/chrism/myproject/pyramid.wsgi - <Directory /Users/chrism/myproject> + <Directory /Users/chrism/myproject> WSGIProcessGroup pyramid Require all granted - </Directory> + </Directory> #. Restart Apache .. code-block:: bash - $ sudo /usr/sbin/apachectl restart + sudo /usr/sbin/apachectl restart #. Visit ``http://localhost/myapp`` in a browser. You should see the sample application rendered in your browser. |
