2008/8/27 PeteDK <[EMAIL PROTECTED]>: > On 21 Aug., 16:25, "Guillaume Lederrey" <[EMAIL PROTECTED]> > wrote: >> 2008/8/21 PeteDK <[EMAIL PROTECTED]>: >> > On 21 Aug., 13:10, "Guillaume Lederrey" <[EMAIL PROTECTED]> >> > wrote: >> >> 2008/8/21 PeteDK <[EMAIL PROTECTED]>: >> >> I'm still not clear on how your user log into the server. Via SSH, >> >> HTTP Auth, other ? >> >> > Sorry i failed to answer your question. I must admit i don't know >> > exactly how the user logs in. I will try to get that information :-) >> >> I'm pretty sure we will be able to give you more meaningful answers >> with that piece of information ... ;-) > > I now have some new information. I now believe that what i need is the > visitors information. > > On another system on the same network(written in Perl) it is done this > way: > $loginbruger=uc($ENV{AUTHENTICATE_SAMACCOUNTNAME}); > > (loginbruger is danish for loginuser) > > can i do the same thing in python?? get the visitors username?
Again, without understanding how the users log into the server, we can only guess ... SAMACCOUNTNAME makes me think about Windows (SAM = Security Account Manager), but that's just based on the name, and that name could well mean something else in your context. >From what I understand, the name is stored in an environment variable (but I dont know how it gets there). Usually, the environment of a process isnt changed from the outside after creation. And Django is a long running process, so it should not pick up users logging in after startup. But I can be completely wrong on that one ... Assuming I am wrong above, you should be able to access the same environment variable from python code with : import os loginbruger = os.environ['AUTHENTICATE_SAMACCOUNTNAME'] More infos on http://docs.python.org/lib/os-procinfo.html The real problem I see there is that if there is multiple users connected to the server, I dont see how the right user could be associated with an HTTP session ... Good luck, and please, try to get the info on how the login process works ! -- Jabber : [EMAIL PROTECTED] Skype : Guillaume.Lederrey Projects : * http://rwanda.ledcom.ch/ * http://trock.ch/ Others : * http://kiva.org/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---