By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,235 Members | 1,011 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,235 IT Pros & Developers. It's quick & easy.

use mod_python' session and redirect

P: n/a
hi all
when i use Session object to save a object and then i use
util.redirect(req,url) to redirect a .psp.But in my psp i cann't load
session so i cann't get object from session,help me,thanks
here is my code
..py
s=Session.Session(req)
s["cur_user"]=user
s.set_timeout(18000)
s.save()
util.redirect(req, "/psp/user/edituser.psp")
edituser.psp
<%
import com.lgd.model.allmodel as am
from mod_python import Session
sess=Session.Session(req)
user=am.User()
uname=None
upass=None
fullname=None
email=None
if sess.is_new():
req.write("somethin opration")
else:
user=sess["cur_user"]
uname=user.uname
upass=user.upass
fullname=user.fullname
email=user.email
%>
Sep 5 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.