mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[3.2.x] Improved pagination documentation
* Link to the topic guide
* Document that page() can raise PageNotAnInteger.
Backport of a57e91adee from master
			
			
This commit is contained in:
		
				
					committed by
					
						 Carlton Gibson
						Carlton Gibson
					
				
			
			
				
	
			
			
			
						parent
						
							aa1aed923b
						
					
				
				
					commit
					2ce4f73241
				
			| @@ -6,6 +6,8 @@ Django provides a few classes that help you manage paginated data -- that is, | ||||
| data that's split across several pages, with "Previous/Next" links. These | ||||
| classes live in :source:`django/core/paginator.py`. | ||||
|  | ||||
| For examples, see the :doc:`Pagination topic guide </topics/pagination>`. | ||||
|  | ||||
| .. module:: django.core.paginator | ||||
|    :synopsis: Classes to help you easily manage paginated data. | ||||
|  | ||||
| @@ -76,7 +78,9 @@ Methods | ||||
| .. method:: Paginator.page(number) | ||||
|  | ||||
|     Returns a :class:`Page` object with the given 1-based index. Raises | ||||
|     :exc:`InvalidPage` if the given page number doesn't exist. | ||||
|     :exc:`PageNotAnInteger` if the ``number`` cannot be converted to an integer | ||||
|     by calling ``int()``. Raises :exc:`InvalidPage` if the given page number | ||||
|     doesn't exist. | ||||
|  | ||||
| .. method:: Paginator.get_elided_page_range(number, *, on_each_side=3, on_ends=2) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user