Exemplo n.º 1
0
    def threads(self, request, pk=None):
        profile = self.get_user(request, pk)

        page = get_int_or_404(request.query_params.get('page', 0))
        if page == 1:
            page = 0  # api allows explicit first page

        feed = UserThreads(request, profile, page)

        return Response(feed.get_frontend_context())
Exemplo n.º 2
0
    def threads(self, request, pk=None):
        profile = self.get_user(request, pk)

        page = get_int_or_404(request.query_params.get('page', 0))
        if page == 1:
            page = 0  # api allows explicit first page

        feed = UserThreads(request, profile, page)

        return Response(feed.get_frontend_context())
Exemplo n.º 3
0
def threads(request, profile):
    context = {
        'profile': profile
    }

    feed = UserThreads(request, profile)
    context.update(feed.get_template_context())

    request.frontend_context['POSTS'] = feed.get_frontend_context()

    return render(request, 'misago/profile/threads.html', context)
Exemplo n.º 4
0
    def get_context_data(self, request, profile):
        feed = UserThreads(request, profile)

        request.frontend_context['POSTS'] = feed.get_frontend_context()
        return feed.get_template_context()
Exemplo n.º 5
0
    def get_context_data(self, request, profile):
        feed = UserThreads(request, profile)

        request.frontend_context['POSTS'] = feed.get_frontend_context()
        return feed.get_template_context()