Customization
Settings
You can customize the application using settings.py.
Name |
Default |
Description |
|---|---|---|
|
10 |
How many objects are normally displayed in a page (overwriteable by templatetag). |
|
‘page’ |
The querystring key of the page number
(e.g. |
|
0 |
See Django Paginator definition of orphans. |
|
‘loading’ |
If you use the default |
|
‘<’ |
Default label for the previous page link. |
|
‘>’ |
Default label for the next page link. |
|
‘<<’ |
Default label for the first page link. |
|
‘>>’ |
Default label for the last page link. |
|
False |
Set to True if your SEO alchemist wants search engines not to follow pagination links. |
|
None |
Callable (or dotted path to a callable) that
returns pages to be displayed.
If None, a default callable is used;
that produces Digg-style pagination.
The applicationt provides also a callable
producing elastic pagination:
|
|
3 |
Default number of extremes displayed when Digg-style pagination is used with the default callable. |
|
2 |
Default number of arounds displayed when Digg-style pagination is used with the default callable. |
|
False |
Whether or not the first and last pages arrows are displayed when Digg-style pagination is used with the default callable. |
|
‘template’ |
Template variable name used by the
|
|
False |
If True on page out of range, throw a 404 exception, otherwise display the first page. There is a view that maintains the original functionality but sets the 404 status code found in el_pagination\views.py |
|
False |
Add is_previous & is_next flags for previous and next pages |
Templates and CSS
You can override the default template for show_more templatetag following
some rules:
more link is shown only if the variable
querystringis not False;the container (most external html element) class is endless_container;
the more link and the loader hidden element live inside the container;
the more link class is endless_more;
the more link data-el-querystring-key attribute is
{{ querystring_key }};the loader hidden element class is endless_loading.