Hello,

I solved it myself...
After some logging I found out that the Acitivity's process_request is 
indeed never reached (that I knew already :) but when CommonMiddleware 
does his append slash-stuff the full(!) process_response chain is 
processed - which means also the Acitvity's process_response.

Constantin Christmann schrieb:
> Hello,
> 
> lately I installed a middleware to track user activity on my website 
> (mainly code from this blog post 
> http://whijo.net/blog/brad/2007/07/19/statistics-logging-django.html)
> 
> I use the following middleware classes:
> MIDDLEWARE_CLASSES = (
>      'django.middleware.common.CommonMiddleware',
>      'django.contrib.sessions.middleware.SessionMiddleware',
>      'django.contrib.auth.middleware.AuthenticationMiddleware',
>      'django.middleware.http.SetRemoteAddrFromForwardedFor',
>      'tucent.analytics.middleware.Activity',
>      'django.middleware.transaction.TransactionMiddleware',
> )
> 
> The problem is that if I enter urls without trailing slash I get an 
> error in my Activity class inside the process_response function.
> The cause for this error is that process_response gets called before the 
> process_request has been called and a required variable is not instanciated.
> 
> How can that be? When CommonMiddleware is redirecting the request 
> without the trailing slash this should never reach my Activity 
> middleware? Or am I missing something here?
> 
> Thanks,
> Constantin
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to