Hi all,

In my application i have a login screen. The view is simple as below:

    loginform=None
    formvalid=True

    if request.method == "POST":
       
        username = request.POST['username']
        password = request.POST['password']
        loginform=LoginForm(request.POST)

        formvalid=loginform.is_valid()

        if formvalid:

            user = authenticate(username=username, password=password)
            if user is not None:
                if user.is_active:
                    login(request, user)
                    return render_to_response("menu.html", 
{"somekey":somevalue})

...


menu.html has some menus. One of them had the address of "localhost/add" which 
is defined in urls.py also. The view for add, is also add. But at my add 
function it seems i lost my session. 
    if not request.user.is_authenticated():
        return HttpResponse("nok")
    else:
        return HttpResponse("ok")

So i am gettig alwasy nok on the screen. How can i keep accesing session values 
from not posted sites? 

-- 
Oguz Yarimtepe <comp....@gmail.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