def handler(request): welcome="""<div class="welcome"><p>Welcome to KolmoGNUS, the bayesian classifier that finds cool links for YOU</p></div>""" param,session=common.init_request(request) rate_story(param,session) header='' header+=common.html_session(param,session,request) header+=common.html_menu() main_frame='' if session.has_key('login'): #user logged in main_frame+=html_recommended_stories(session) main_frame+=html_liked_symbols(param,session) main_frame+=html_feed_submitter(param,session) main_frame+=html_stories() main_frame+=html_rated_stories(session) #main_frame+=html_feeds() main_frame+=html_users() else: main_frame+=welcome main_frame+=html_stories() #main_frame+=html_feeds() main_frame+=html_users() footer='' footer+=common.html_debug(param,request) request.write(common.html_page(header,main_frame,footer).encode('utf-8')) return apache.OK
def handler(request): param, session = common.init_request(request) uri_param = request.uri.split("/") header = "" header += common.html_session(param, session, request) header += common.html_menu() main_frame = "" if len(uri_param) > 2 and uri_param[1] == "story": main_frame += html_story_info(uri_param[2]) else: main_frame += html_stories_info() footer = "" footer += common.html_debug(param, request) request.write(common.html_page(header, main_frame, footer).encode("utf-8")) return apache.OK
def handler(request): param,session=common.init_request(request) uri_param=request.uri.split('/') header='' header+=common.html_session(param,session,request) header+=common.html_menu() main_frame='' if len(uri_param)>2 and uri_param[1]=='feed': main_frame+=html_feed_info(uri_param[2]) else: main_frame+=html_feeds_info() footer='' footer+=common.html_debug(param,request) request.write(common.html_page(header,main_frame,footer).encode('utf-8')) return apache.OK