def event_review_yes(id): event = Event.mc_get(id) #print event,id, event.state if event and event.state <= EVENT_STATE_TO_REVIEW: event.state = EVENT_STATE_BEGIN event.save() mc_flush_by_city_pid_cid(event.city_pid, event.cid) zsite_id = event.zsite_id event_joiner_new(id, zsite_id, EVENT_JOIN_STATE_YES) po = Po.mc_get(id) if po.zsite_id: state = STATE_PO_ZSITE_SHOW_THEN_REVIEW else: state = STATE_ACTIVE po_state_set(po, state) notice_event_yes(event.zsite_id, id) mc_event_id_list_by_zsite_id.delete('%s_%s'%(zsite_id, False)) mq_rendermail( '/mail/event/event_review_yes.txt', mail_by_user_id(event.zsite_id), event.zsite.name, link=po.link, title=po.name, price=event.price )
def event_review_yes(id): event = Event.mc_get(id) #print event,id, event.state if event and event.state <= EVENT_STATE_TO_REVIEW: event.state = EVENT_STATE_BEGIN event.save() mc_flush_by_city_pid_cid(event.city_pid, event.cid) zsite_id = event.zsite_id event_joiner_new(id, zsite_id, EVENT_JOIN_STATE_YES) po = Po.mc_get(id) if po.zsite_id: state = STATE_PO_ZSITE_SHOW_THEN_REVIEW else: state = STATE_ACTIVE po_state_set(po, state) notice_event_yes(event.zsite_id, id) mc_event_id_list_by_zsite_id.delete('%s_%s' % (zsite_id, False)) mq_rendermail('/mail/event/event_review_yes.txt', mail_by_user_id(event.zsite_id), event.zsite.name, link=po.link, title=po.name, price=event.price)
def notice_event_join_yes(from_id, to_id, event_id): n = notice_new(from_id, to_id, CID_NOTICE_EVENT_JOIN_YES, event_id) mail = mail_by_user_id(to_id) zsite = Zsite.mc_get(to_id) po = Po.mc_get(event_id) title = po.name link = po.link mq_rendermail('/mail/event/event_join_yes.txt', mail, zsite.name, link=link, title=title ) return n
def notice_event_join_no(from_id, to_id, event_id, txt): cid = CID_NOTICE_EVENT_JOIN_NO n = notice_new(from_id, to_id, cid, event_id, txt=txt) mc_notice_last_id_by_zsite_id_cid.set('%s_%s' % (from_id, cid), n.id) mail = mail_by_user_id(to_id) zsite = Zsite.mc_get(to_id) po = Po.mc_get(event_id) title = po.name link = po.link mq_rendermail('/mail/event/event_join_no.txt', mail, zsite.name, link=link, title=title, reason=txt ) return n
def event_review_no(id, txt): event = Event.mc_get(id) if event and event.state == EVENT_STATE_TO_REVIEW: event.state = EVENT_STATE_REJECT event.save() notice_event_no(event.zsite_id, id, txt) zsite = event.zsite mq_rendermail( '/mail/event/event_review_no.txt', mail_by_user_id(event.zsite_id), event.zsite.name, title=event.po.name, reason=txt, zsite_link='http:%s'%zsite.link, id=id, )
def event_review_no(id, txt): event = Event.mc_get(id) if event and event.state == EVENT_STATE_TO_REVIEW: event.state = EVENT_STATE_REJECT event.save() notice_event_no(event.zsite_id, id, txt) zsite = event.zsite mq_rendermail( '/mail/event/event_review_no.txt', mail_by_user_id(event.zsite_id), event.zsite.name, title=event.po.name, reason=txt, zsite_link='http:%s' % zsite.link, id=id, )
def verify_mail_new(user_id, name, mail, cid): id, ck = verify_new_one(user_id, cid) template = VERIFY_TEMPLATE[cid] print 'http://%s/auth/verify/login/mail/%s/%s' % (SITE_DOMAIN, id, ck) mq_rendermail(template, mail, name, id=id, ck=ck)
def verify_mail_new(user_id, name, mail, cid): id, ck = verify_new_one(user_id, cid) template = VERIFY_TEMPLATE[cid] print 'http://%s/auth/verify/login/mail/%s/%s'%(SITE_DOMAIN, id, ck) mq_rendermail(template, mail, name, id=id, ck=ck)