mod_python을 이용한 파이썬 웹 삽질중 몇가지..
환경
Autoset + mod_python + python2.5
.httpaccess 설정
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
참고 코드
# -*- coding: cp949 -*-
from mod_python import Session
def header(req):
#Ajax사용할때 캐싱금지를 위한 헤더설정
req.headers_out['Pragma'] = 'no-cache'
req.headers_out['Cache-Control'] = 'no-cache'
req.headers_out['Expires'] = '-1'
def accountConfirm(req, userid, userpass):
header(req)
session = Session.Session(req) # 세션
# 유저 계정 확인은 알아서
try:
session['id'] = userid
session['state'] = "online"
except:
return 0
session.save()
return "%s|%s" % ( userid, , session['state'] )
이 글과 관련있는 글을 자동검색한 결과입니다 [?]