On Wed, Sep 10, 2008 at 4:06 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:

> We have this problem that's been seen in the wild by a couple-three people
> now:
>
> http://code.djangoproject.com/ticket/8110
>
> It apparently results from the AdminLogNode's render() function getting
> called multiple times, since the patch that protects against that by not
> modifying self.user in render fixes the issue for the last two people who
> have reported the problem.  I think that's an OK fix (render() is supposed
> to allow for being called more than once, right, since if the template tag
> is in a loop the same node will get rendered multiple times?)...but I can't
> understand why, in this case, render() is getting called more than once.
> The tag is not in any sort of a loop in admin's index.html file (and the
> reporter says that file has not been modified).  What else might cause
> render to get called multiple times for the same template node?
>
> A further bit of weirdness is that the problem is reported to only occur
> with DEBUG set to False.  If deubug is on, no problem.  If it's off,
> sporadic internal server errors on the main admin page.  I can't recreate it
> at all, regardless of debug setting or deployment method.  Any ideas?
>

Armin's notes on template thread-safety reminded me of this little problem.
If I'm reading his notes correctly, multiple threads re-using the same
parsed template object could cause this problem.  But, he also notes that by
default templates are parsed and evaluated for each request, so the app
would have to do something to cause the same parsed template to be used for
multiple requests...and from a quick look I can't see that Admin does
anything like that?

Does anyone have an opinion on whether it would be better to just put the
existing fix in as-is, or leave this open for a bit to try to understand why
it is happening?

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to