From 34a3bd52255a2253696b74b2d76133aace839fd2 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 6 Aug 2008 15:32:46 +0000 Subject: Major refactoring of django.dispatch with an eye towards speed. The net result is that signals are up to 90% faster. Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes. Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561) were incorporated. Documentation is, sigh, still forthcoming. Fixes #6814 and #3951 (with the new dispatch_uid argument to connect). git-svn-id: http://code.djangoproject.com/svn/django/trunk@8223 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/handlers/modpython.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'django/core/handlers/modpython.py') diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py index 58699816fd..aa3fb23e39 100644 --- a/django/core/handlers/modpython.py +++ b/django/core/handlers/modpython.py @@ -5,7 +5,6 @@ from django import http from django.core import signals from django.core.handlers.base import BaseHandler from django.core.urlresolvers import set_script_prefix -from django.dispatch import dispatcher from django.utils import datastructures from django.utils.encoding import force_unicode, smart_str @@ -174,7 +173,7 @@ class ModPythonHandler(BaseHandler): self.load_middleware() set_script_prefix(req.get_options().get('django.root', '')) - dispatcher.send(signal=signals.request_started) + signals.request_started.send(sender=self.__class__) try: try: request = self.request_class(req) @@ -188,7 +187,7 @@ class ModPythonHandler(BaseHandler): response = middleware_method(request, response) response = self.apply_response_fixes(request, response) finally: - dispatcher.send(signal=signals.request_finished) + signals.request_finished.send(sender=self.__class__) # Convert our custom HttpResponse object back into the mod_python req. req.content_type = response['Content-Type'] -- cgit v1.3