Changes between Initial Version and Version 1 of PsycoMiddleware


Ignore:
Timestamp:
Oct 13, 2006, 7:20:40 PM (18 years ago)
Author:
floguy@…
Comment:

Added PsycoMiddleware

Legend:

Unmodified
Added
Removed
Modified
  • PsycoMiddleware

    v1 v1  
     1{{{
     2#!python
     3class PsycoMiddleware(object):
     4    """
     5    This middleware enables the psyco extension module which can massively
     6    speed up the execution of any Python code.
     7    """
     8    def process_request(self, request):
     9        try:
     10            from psyco import psyco
     11            psyco.profile()
     12        except ImportError:
     13            pass
     14        return None
     15}}}
Back to Top