소스 검색

Fixed #28745 -- Added first and last page links to paginator docs example.

Sam Morrow 7 년 전
부모
커밋
dcc0427c58
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      docs/topics/pagination.txt

+ 2 - 0
docs/topics/pagination.txt

@@ -108,6 +108,7 @@ pages along with any interesting information from the objects themselves::
     <div class="pagination">
         <span class="step-links">
             {% if contacts.has_previous %}
+                <a href="?page=1">&laquo; first</a>
                 <a href="?page={{ contacts.previous_page_number }}">previous</a>
             {% endif %}
 
@@ -117,6 +118,7 @@ pages along with any interesting information from the objects themselves::
 
             {% if contacts.has_next %}
                 <a href="?page={{ contacts.next_page_number }}">next</a>
+                <a href="?page={{ contacts.paginator.num_pages }}">last &raquo;</a>
             {% endif %}
         </span>
     </div>