Esempio n. 1
0
def user_manage_post():
    '''用户管理POST数据'''
    _action = request.POST.get('action', '')
    if 'unpass' == _action:
        return UsersService.unpass_user()
    if 'pass' == _action:
        return UsersService.pass_user()
Esempio n. 2
0
def user_manage_post():
    '''用户管理POST数据'''
    _action = request.POST.get('action', '')
    if 'unpass' == _action:
        return UsersService.unpass_user()
    if 'pass' == _action:
        return UsersService.pass_user()
Esempio n. 3
0
def user_manage(page=None):
    '''用户管理'''
    if not page:
        page = 1
    _status = request.query.get('status', None)
    _search = request.query.get('search', None)
    _entries = UsersService.get_list_by_page(page, status=_status, search=_search)
    _count = UsersService.get_count(status=_status, search=_search)
    _pagenavi = pages(_count, page)
    _pagenavi["param"] = request.query_string    #url参数
    return template("admin/user-list.html", handler=get_site_info(), entries=_entries, pagenavi=_pagenavi, query = request.query)
Esempio n. 4
0
def user_manage(page=None):
    '''用户管理'''
    if not page:
        page = 1
    _status = request.query.get('status', None)
    _search = request.query.get('search', None)
    _entries = UsersService.get_list_by_page(page,
                                             status=_status,
                                             search=_search)
    _count = UsersService.get_count(status=_status, search=_search)
    _pagenavi = pages(_count, page)
    _pagenavi["param"] = request.query_string  #url参数
    return template("admin/user-list.html",
                    handler=get_site_info(),
                    entries=_entries,
                    pagenavi=_pagenavi,
                    query=request.query)
Esempio n. 5
0
def user_change_password_post():
    '''修改密码'''
    return UsersService.change_password()
Esempio n. 6
0
def admin_register():
    '''注册用户'''
    return UsersService.register()
Esempio n. 7
0
def admin_check_is_registered_post():
    '''检查是否已经注册'''
    return UsersService.check_is_registered()
Esempio n. 8
0
def admin_log_out():
    '''退出'''
    UsersService.log_out()
    redirect('/admin/login', 302)
Esempio n. 9
0
def admin_login_post():
    '''登陆'''
    return UsersService.login()
Esempio n. 10
0
def user_change_password_post():
    '''修改密码'''
    return UsersService.change_password()
Esempio n. 11
0
def admin_register():
    '''注册用户'''
    return UsersService.register()
Esempio n. 12
0
def admin_check_is_registered_post():
    '''检查是否已经注册'''
    return UsersService.check_is_registered()
Esempio n. 13
0
def admin_log_out():
    '''退出'''
    UsersService.log_out()
    redirect('/admin/login', 302)
Esempio n. 14
0
def admin_login_post():
    '''登陆'''
    return UsersService.login()