Hi everyone,

I have a question about how to pass a variable from one view function
to another view function, and how to displace the variable from one
html template to another one.

for example :  I want Pquery(query)[1] in Psearch to be stored, and
then call it in another function page. In addition, I want Pquery
(query)[1] to be called in page.html. However I' m not good at django
session,  there's some errors that i cannot figure it out. Could you
tell me how to make it work.Thanks!


(view.py)
def Psearch(request):
    query = request.GET.get('Pquery','')
    request.session['IPI']=Pquery(query)[1]
    return render_to_response('Psearch_result.html',
{'Pquery':query,'Pquery_out': Pquery(query)[0]})

def page(request):
    query=request.session['IPI']
    return render_to_response('page.html',{'summary': summary(query)})

--~--~---------~--~----~------------~-------~--~----~
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