Maybe no one faced that problem. I now want to know why sometimes the user doesn't change if there was 2 simultaneous connection. how can I do that each connection use a different local thread? (Or I don't understand something in this hack??) ibson wrote: > Hi, > I'm using the threadlocals hack > (http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser) in my > model to filter machines by group. But it's not stable at all. And most > of the time the filter return nothing because the usergroup is empty. > > Here's a piece of my code : > usergroup = threadlocals.get_current_user().groups.all()[0] > machine = models.ForeignKey(Machine, limit_choices_to = > {'group':usergroup}) > > On the admin interface the list is empty, but after some browser > refreshing it comes, and then goes away..... It's not stable at all. > > Some help please? I'm facing this problem for weeks now in my > project!!! :|
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---