Ejemplo n.º 1
0
    def followers(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

        search = request.query_params.get('search')

        users = Followers(request, profile, page, search)

        return Response(users.get_frontend_context())
Ejemplo n.º 2
0
    def followers(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

        search = request.query_params.get('search')

        users = Followers(request, profile, page, search)

        return Response(users.get_frontend_context())
Ejemplo n.º 3
0
    def get_context_data(self, request, profile):
        users = Followers(request, profile)

        request.frontend_context['PROFILE_FOLLOWERS'] = users.get_frontend_context()
        return users.get_template_context()
Ejemplo n.º 4
0
    def get_context_data(self, request, profile):
        users = Followers(request, profile)

        request.frontend_context[
            'PROFILE_FOLLOWERS'] = users.get_frontend_context()
        return users.get_template_context()