Ticket #5677: 5677_modpython.diff

File 5677_modpython.diff, 1.8 KB (added by Daniel Roseman, 14 years ago)

Updated patch removing references to WSGI.

  • docs/howto/deployment/modpython.txt

     
    153153When deploying Django sites on mod_python, you'll need to restart Apache each
    154154time you make changes to your Python code.
    155155
     156.. _mod_python documentation: http://modpython.org/live/current/doc-html/directives.html
     157
    156158Multiple Django installations on the same Apache
    157159================================================
    158160
     
    206208revoke your Django privileges.
    207209
    208210If you're the type of programmer who debugs using scattered ``print``
    209 statements, note that ``print`` statements have no effect in mod_python; they
    210 don't appear in the Apache log, as one might expect. If you have the need to
    211 print debugging information in a mod_python setup, either do this::
     211statements, note that writing to ``stdout`` with a regular ``print`` statement
     212is a bad idea.  Things written in this fashion will not appear in the Apache
     213log, as one might expect.
    212214
    213     assert False, the_value_i_want_to_see
     215If you have the need to print debugging information in a mod_python setup, you
     216have three options.  The first is to print to ``stderr`` explicitly, like so::
    214217
    215 Or add the debugging information to the template of your page.
     218    print >> sys.stderr, 'debug text'
     219    sys.stderr.flush()
    216220
    217 .. _mod_python documentation: http://modpython.org/live/current/doc-html/directives.html
     221Note that ``stderr`` is buffered, so calling ``flush`` is necessary if you wish
     222debugging information to be displayed promptly.
    218223
     224A second, more compact approach is to use an assertion::
     225
     226    assert False, 'debug text'
     227
     228The third option is to add debugging information to the template of your page.
     229
    219230.. _serving-media-files:
    220231
    221232Serving media files
Back to Top