On Mon, Feb 18, 2013 at 10:26 PM, anirudh bhat <abha...@gmail.com> wrote:
> Hello Jaganadh, your question is too abstract.Maybe you can show us some > code u have written if you dont mind.There maybe lot of things that can go > wrong here....one such example is that maybe there is some problem with > your Jquery code.Is page redirecting done right?? what does your django > error log says?? > > > Hi This is the code which redirects the page def user_login(request): cache.clear() request.session.flush() """ Logging the user to the system """ state = "Login using your credentials" username,password = "","" if request.POST: username = request.POST.get('username') password = request.POST.get('password') user = authenticate(username= username,password=password) request.COOKIES['username'] = username if user is not None and user.is_authenticated(): if user.is_active: login(request,user) state = "Your login was successful !" cookie_name = request.COOKIES['username'] #return redirect('/index/',{'username':username},RequestContext(request,{'username':username})) #return HttpResponseRedirect('/index/',{'username':cookie_name}) #return redirect('/index/',{'username':cookie_name}) #return render_to_response('Index.html',{'username':cookie_name}) #return redirect('/index/',{'username':cookie_name}) return render_to_response('Index.html',{'username':cookie_name}) else: state = "Your credentials are incorrect !" return render_to_response("Login.html",{'state':state,'username':username}) -- ********************************** JAGANADH G http://jaganadhg.in *ILUGCBE* http://ilugcbe.org.in _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers