i.e def login is called with the login template, example 
the first client's username is JOHN and the second is DAPH
JOHN's module template is moduleA and DAPH's module 
template is moduleB. when JOHN login the session has 
create with username JOHN (request.session['userlogin'] = 
login.name) and when DAPH also login while JOHN has not 
logout, the session changed into DAPH's username.

how to make 2 different session so when it send back to 
server, the server can read their both session separately,
thx

in this case, how to make session name has multi value?

On Tue, 03 Feb 2009 16:27:46 +1100
  Malcolm Tredinnick <malc...@pointy-stick.com> wrote:
> 
> On Tue, 2009-02-03 at 12:17 +0700, Harryanto Ie wrote:
>> hmm... i have createed the server, and i have 2 client 
>> site. each client has different module to access and 
>>there 
>> are separated when login section.
>> 
>> i'm doing now is :
>> i.e :
>> 
>> def login(request) :
>>    login = 
>> User.objects.get(username=request.POST['uname'])
>>    request.session['userlogin'] = login.name
> 
> This looks like a very difficult way to handle logging 
>in. The session
> already contains a reference to the logged-in user's 
>User instance. So
> why not just use the normal path? When user #2 logs in, 
>they will get a
> new session, completely independent of user #1. You seem 
>to be writing
> your own login layer on top of the existing login layer 
>here.
> 
>>    
>>    return 
>> response_to_render('guest.html',{'userlogin':request.session['userlogin']})
>> 
>> def moduleA(request) :  --> this is module for 1st 
>>client
>>    return 
>> response_to_render('module2.html',{'userlogin':request.session['userlogin']})
>> 
>> def moduleB(request) :  --> this is module for 2nd 
>>client
>>    return 
>> response_to_render('module1.html',{'userlogin':request.session['userlogin']})
> 
> So what code is responsible for deciding whether moduleA 
>or moduleB is
> called? Nothing in this code calls either one.
> 
> Malcolm
> 
> 
> 
> > 

============================================================================================================================
"Flexi - Gratis bicara sepanjang waktu se-Jawa Barat, Banten dan DKI Jakarta."

"Speedy - Gratis internetan unlimited dari pkl. 20.00 s/d 08.00 se-Jabodetabek, 
Banten, Karawang dan Purwakarta."
============================================================================================================================
“Nikmati akses TelkomNet Instan Week End Net hanya Rp 1.000/jam. Berlaku untuk 
Sabtu-Minggu, khusus Jawa Tengah dan DIY s/d 

31 Desember 2008”.
============================================================================================================================
"Kini telah hadir Protector, layanan keamanan online yang dapat digunakan 
langsung saat menjelajahi internet kapan saja dan 

di mana saja. Dapatkan secara GRATIS layanan Protector hingga 31 Desember 2008. 
Klik ke: http://protector.telkomspeedy.com";.

============================================================================================================================

Ikuti Speedy Blogging Competition 2008, ajang kompetisi Blog yang terbuka bagi 
semua Blogger dengan tema: Seperti Apa Konten Hebat Menurutmu? Dapatkan hadiah 
utama 1 Buah Notebook Mininote. Informasi lebih lanjut kunjungi 
http://lomba.blog.telkomspeedy.com

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to