def user_manage_post(): '''用户管理POST数据''' _action = request.POST.get('action', '') if 'unpass' == _action: return UsersService.unpass_user() if 'pass' == _action: return UsersService.pass_user()
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)
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)
def user_change_password_post(): '''修改密码''' return UsersService.change_password()
def admin_register(): '''注册用户''' return UsersService.register()
def admin_check_is_registered_post(): '''检查是否已经注册''' return UsersService.check_is_registered()
def admin_log_out(): '''退出''' UsersService.log_out() redirect('/admin/login', 302)
def admin_login_post(): '''登陆''' return UsersService.login()