Version 2 (modified by Stephen McDonald, 9 years ago) (diff)

Changed "from psyco import psyco" to "import psyco"

class PsycoMiddleware(object):
    """
    This middleware enables the psyco extension module which can massively
    speed up the execution of any Python code.
    """
    def process_request(self, request):
        try:
            import psyco
            psyco.profile()
        except ImportError:
            pass
        return None
Back to Top