adam
unread,Nov 3, 2009, 11:23:26 AM11/3/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to codereview-discuss
AddUserToRequestMiddleware stores the current user's Account in a
static variable, models.Account.current_user_account. I thought this
was strange and guessed that static variables in Python must be thread-
local... but as it turns out they're not. So, as far as I understand,
it's quite easy for one request to get another user's Account instance
as models.Account.current_user_account, so long as they both hit the
web server at approximately the same time.
is my understanding correct? What is up with this design decision? I'm
just learning Django, Python, and GAE so I'd like to use only the best
examples.
Thanks,
Adam