Ejemplo n.º 1
0
def post_list(request, board_url):
    get_post_list = _get_post_list(request, board_url)
    post_list = get_post_list[0]
    paginator = get_post_list[1]
    board_list = _get_board_list()
    querystring = _get_querystring(request)
    current_board = _get_current_board(request, board_url)
    adult_filter = request.GET.get('adult_filter')
    is_adult = False
    if adult_filter == "true":
        is_adult = True
    return render(
        request, 'board/board_list.html', {
            'post_list': post_list,
            'board_list': board_list,
            'current_board': current_board,
            'is_adult': is_adult,
            'querystring': querystring,
            'paginator': paginator,
        })
Ejemplo n.º 2
0
def post_list(request, board_url):
    get_post_list = _get_post_list(request, board_url)
    post_list = get_post_list[0]
    paginator = get_post_list[1]
    board_list = _get_board_list()
    querystring = _get_querystring(request)
    current_board = _get_current_board(request, board_url)
    adult_filter = request.GET.get('adult_filter')
    is_adult = False
    if adult_filter == "true":
        is_adult = True
    return render(request,
                  'board/board_list.html',
                  {
                      'post_list': post_list,
                      'board_list': board_list,
                      'current_board': current_board,
                      'is_adult': is_adult,
                      'querystring': querystring,
                      'paginator': paginator,
                  })
Ejemplo n.º 3
0
def post_read(request, board_url, post_id):
    get_content = _get_content(request, post_id)
    post = get_content[0]
    comment_list = get_content[1]
    get_post_list = _get_post_list(request, board_url)
    post_list = get_post_list[0]
    paginator = get_post_list[1]
    board_list = _get_board_list()
    querystring = _get_querystring(request)
    current_board = _get_current_board(request, board_url)
    return render(request,
                  'board/board_read.html',
                  {
                      'querystring': querystring,
                      'post': post,  # post for post
                      'comment_list': comment_list,  # comment for post
                      # Below,there are thing for postList.
                      'post_list': post_list,
                      'board_list': board_list,
                      'current_board': current_board,
                      'paginator': paginator,
                  })
Ejemplo n.º 4
0
def post_read(request, board_url, post_id):
    get_content = _get_content(request, post_id)
    post = get_content[0]
    comment_list = get_content[1]
    get_post_list = _get_post_list(request, board_url)
    post_list = get_post_list[0]
    paginator = get_post_list[1]
    board_list = _get_board_list()
    querystring = _get_querystring(request)
    current_board = _get_current_board(request, board_url)
    return render(
        request,
        'board/board_read.html',
        {
            'querystring': querystring,
            'post': post,  # post for post
            'comment_list': comment_list,  # comment for post
            # Below,there are thing for postList.
            'post_list': post_list,
            'board_list': board_list,
            'current_board': current_board,
            'paginator': paginator,
        })