nanterre: correction aux URLs de pagination (fixes #19592)
This commit is contained in:
parent
bcdd59823c
commit
0aee098b42
|
@ -32,6 +32,7 @@ from django.db.transaction import non_atomic_requests, atomic
|
|||
from django.core.urlresolvers import reverse
|
||||
from django.http import Http404, HttpResponse
|
||||
from django.utils.timezone import now
|
||||
from django.utils.http import urlencode
|
||||
|
||||
from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
|
@ -831,7 +832,7 @@ class JournalView(IndividuViewMixin, APIView):
|
|||
more_url = request.build_absolute_uri(
|
||||
reverse('rsu-api-journal', kwargs={'identifier': individu.id}))
|
||||
cookie = str(max_id)
|
||||
more_url += '?limit=%d&cookie=%s' % (limit, cookie)
|
||||
more_url += '?' + urlencode({'limit': limit, 'cookie': cookie})
|
||||
content['cookie'] = cookie
|
||||
content['more'] = more_url
|
||||
return Response(content)
|
||||
|
@ -1881,7 +1882,7 @@ class DoublonsView(DoublonMixin, APIView):
|
|||
max_id = qs[limit - 1].id
|
||||
more_url = request.build_absolute_uri(reverse('rsu-api-doublons'))
|
||||
cookie = '%s_%s' % (since, max_id)
|
||||
more_url += '?limit=%d&cookie=%s' % (limit, cookie)
|
||||
more_url += '?' + urlencode({'limit': limit, 'cookie': cookie})
|
||||
content['more'] = more_url
|
||||
content['cookie'] = cookie
|
||||
return Response(content)
|
||||
|
|
Loading…
Reference in New Issue