We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
공통 검색 파라미터를 사용시
async def member_list(request: Request, db: Session = Depends(get_db), search_params: dict = Depends(common_search_query_params)):
select query 시
result = select_query( request, models.Member, search_params, same_search_fields = ["mb_level"], prefix_search_fields = ["mb_name", "mb_nick", "mb_tel", "mb_hp", "mb_datetime", "mb_recommend"] ) same_search_fields: # 값이 완전히 같아야지만 필터링 '검색어' prefix_search_fields: # 뒤에 %를 붙여서 필터링 '검색어%'
수정된 회원 관리 리스트 코드
@router.get("/member_list") async def member_list(request: Request, db: Session = Depends(get_db), search_params: dict = Depends(common_search_query_params)): ''' 회원관리 목록 ''' request.session["menu_key"] = MEMBER_MENU_KEY result = select_query( request, models.Member, search_params, same_search_fields = ["mb_level"], prefix_search_fields = ["mb_name", "mb_nick", "mb_tel", "mb_hp", "mb_datetime", "mb_recommend"] ) query_string = generate_query_string(request) context = { "request": request, "members": result['rows'], "admin": request.state.context['member'], # 로그인해 있는 회원을 관리자로 간주함 "total_count": result['total_count'], "paging": get_paging(request, search_params['current_page'], result['total_count'], f"/admin/member_list?{query_string}&page="), } return templates.TemplateResponse("member_list.html", context)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
공통 검색 파라미터를 사용시
async def member_list(request: Request, db: Session = Depends(get_db), search_params: dict = Depends(common_search_query_params)):
select query 시
수정된 회원 관리 리스트 코드
The text was updated successfully, but these errors were encountered: