Esempio n. 1
0
def career_list_set(id, user, unit, title, txt, begin, end, cid):
    user_id = user.id
    for id, unit, title, txt, begin, end in zip(id, unit, title, txt, begin, end):
        career_set(id, user_id, unit, title, txt, begin, end, cid)
    mc_flush(user_id, cid)
    from zsite_verify import zsite_verify_ajust
    zsite_verify_ajust(user)
Esempio n. 2
0
def user_school_new(user, school_id, school_year, school_degree, school_department, txt='', id=None):
    user_id = user.id
    if txt.startswith('经历简述 '):
        txt = ''
    school_id = int(school_id or 0)
    if school_id and school_id in SCHOOL_UNIVERSITY and user_id:
        school_year = int(school_year or 0)
        school_degree = int(school_degree or 0)
        school_department = int(school_department or 0)

        if school_year and school_year < 1000:
            return
        if school_degree and school_degree not in SCHOOL_DEGREE:
            return
        if school_department and school_department not in SCHOOL_UNIVERSITY_DEPARTMENT_ID2NAME:
            return

        if id:
            u = UserSchool.mc_get(id)
        else:
            u = UserSchool()

        u.user_id = user_id
        u.school_id = school_id
        u.school_year = school_year
        u.school_degree = school_degree
        u.school_department = school_department
        u.txt = txt
        u.save()
        mc_flush(user_id, school_id, school_year)
        from zsite_verify import zsite_verify_ajust
        zsite_verify_ajust(user)
        return u
Esempio n. 3
0
def pic_no(id, admin_id):
    user_id = _pic_no(id, admin_id)
    if user_id:
        from zsite_show import zsite_show_rm
        from zsite_verify import zsite_verify_ajust
        from model.zsite import Zsite
        zsite = Zsite.mc_get(user_id)
        zsite_verify_ajust(zsite)
Esempio n. 4
0
def zsite_name_edit(id, name):
    from feed_po import mc_feed_user_dict
    if id:
        zsite = Zsite.mc_get(id)
        if zsite:
            cid = zsite.cid
            if cid == CID_USER:
                name = name.decode('utf-8', 'ignore')[:24]
            zsite.name = name
            zsite.save()
            mc_feed_user_dict.delete(id)
            from zsite_verify import zsite_verify_ajust
            zsite_verify_ajust(zsite)
Esempio n. 5
0
def zsite_name_edit(id, name):
    from feed_po import mc_feed_user_dict
    if id:
        zsite = Zsite.mc_get(id)
        if zsite:
            cid = zsite.cid
            if cid == CID_USER:
                name = name.decode('utf-8', 'ignore')[:24]
            zsite.name = name
            zsite.save()
            mc_feed_user_dict.delete(id)
            from zsite_verify import zsite_verify_ajust
            zsite_verify_ajust(zsite)
Esempio n. 6
0
def user_school_new(user,
                    school_id,
                    school_year,
                    school_degree,
                    school_department,
                    txt='',
                    id=None):
    user_id = user.id
    if txt.startswith('经历简述 '):
        txt = ''
    school_id = int(school_id or 0)
    if school_id and school_id in SCHOOL_UNIVERSITY and user_id:
        school_year = int(school_year or 0)
        school_degree = int(school_degree or 0)
        school_department = int(school_department or 0)

        if school_year and school_year < 1000:
            return
        if school_degree and school_degree not in SCHOOL_DEGREE:
            return
        if school_department and school_department not in SCHOOL_UNIVERSITY_DEPARTMENT_ID2NAME:
            return

        if id:
            u = UserSchool.mc_get(id)
        else:
            u = UserSchool()

        u.user_id = user_id
        u.school_id = school_id
        u.school_year = school_year
        u.school_degree = school_degree
        u.school_department = school_department
        u.txt = txt
        u.save()
        mc_flush(user_id, school_id, school_year)
        from zsite_verify import zsite_verify_ajust
        zsite_verify_ajust(user)
        return u
Esempio n. 7
0
def user_ico_new(user, pic):
    from zsite_verify import zsite_verify_ajust

    ico_new(user.id, pic)
    zsite_verify_ajust(user)
Esempio n. 8
0
def user_ico_new(user, pic):
    from zsite_verify import zsite_verify_ajust
    ico_new(user.id, pic)
    zsite_verify_ajust(user)