mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Merge pull request #3072 from tomchristie/fix-link-headers
Fix link headers in examples, as per RFC5988.
This commit is contained in:
commit
d5609979ca
|
@ -246,11 +246,11 @@ Let's modify the built-in `PageNumberPagination` style, so that instead of inclu
|
|||
previous_url = self.get_previous_link()
|
||||
|
||||
if next_url is not None and previous_url is not None:
|
||||
link = '<{next_url}; rel="next">, <{previous_url}; rel="prev">'
|
||||
link = '<{next_url}>; rel="next", <{previous_url}>; rel="prev"'
|
||||
elif next_url is not None:
|
||||
link = '<{next_url}; rel="next">'
|
||||
link = '<{next_url}>; rel="next"'
|
||||
elif previous_url is not None:
|
||||
link = '<{previous_url}; rel="prev">'
|
||||
link = '<{previous_url}>; rel="prev"'
|
||||
else:
|
||||
link = ''
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user